Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
918af4df
Verified
Commit
918af4df
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: String IDs
parent
d8a2e7ae
No related branches found
No related tags found
3 merge requests
!17
Release 6.0
,
!15
External String IDs
,
!11
DRAFT: file system cleanup
Pipeline
#41755
failed
1 year ago
Stage: test
Stage: deploy
Changes
3
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
procedures/insertEntityProperty.sql
+2
-2
2 additions, 2 deletions
procedures/insertEntityProperty.sql
procedures/query/applyIDFilter.sql
+12
-3
12 additions, 3 deletions
procedures/query/applyIDFilter.sql
procedures/query/initSubEntity.sql
+3
-2
3 additions, 2 deletions
procedures/query/initSubEntity.sql
with
17 additions
and
7 deletions
procedures/insertEntityProperty.sql
+
2
−
2
View file @
918af4df
...
...
@@ -47,7 +47,7 @@ delimiter //
* The overridden name
* DescOverride : TEXT
* The overridden description
* DatatypeOverride :
INT UNSIGNED
* DatatypeOverride :
VARCHAR(255)
* The overridden datatype
* Collection : VARCHAR(255)
* The overridden collection (only if DatatypeOverride is present).
...
...
@@ -64,7 +64,7 @@ CREATE PROCEDURE db_5_0.insertEntityProperty(
in
PropertyStatus
VARCHAR
(
255
),
in
NameOverride
VARCHAR
(
255
),
in
DescOverride
TEXT
,
in
DatatypeOverride
INT
UNSIGNED
,
in
DatatypeOverride
VARCHAR
(
255
)
,
in
Collection
VARCHAR
(
255
),
in
PropertyIndex
INT
UNSIGNED
)
BEGIN
...
...
This diff is collapsed.
Click to expand it.
procedures/query/applyIDFilter.sql
+
12
−
3
View file @
918af4df
...
...
@@ -92,7 +92,9 @@ IF targetSet IS NULL OR targetSet = sourceSet THEN
"1=1"
,
CONCAT
(
"NOT EXISTS (SELECT 1 FROM entity_ids AS eids WHERE eids.id "
,
o
,
' "'
,
EntityID
,
'" '
,
" AND eids.internal_id = `"
,
sourceSet
,
"`.id)"
...
...
@@ -111,7 +113,9 @@ ELSEIF versioned AND sourceSet = "entities" THEN
"1=1"
,
CONCAT
(
"eids.id "
,
o
,
EntityID
' "'
,
EntityID
,
'"'
)),
IF
(
aggVal
IS
NULL
,
""
,
...
...
@@ -122,7 +126,9 @@ ELSEIF versioned AND sourceSet = "entities" THEN
"1=1"
,
CONCAT
(
"eids.id "
,
o
,
EntityID
' "'
,
EntityID
,
'"'
)),
IF
(
aggVal
IS
NULL
,
""
,
...
...
@@ -143,7 +149,10 @@ ELSE
"1=1"
,
CONCAT
(
"eids.id"
,
o
,
EntityID
)),
' "'
,
EntityID
,
'"'
)),
IF
(
aggVal
IS
NULL
,
""
,
CONCAT
(
" AND data.id="
,
...
...
This diff is collapsed.
Click to expand it.
procedures/query/initSubEntity.sql
+
3
−
2
View file @
918af4df
...
...
@@ -60,9 +60,10 @@ BEGIN
DEALLOCATE
PREPARE
stmt
;
IF
EntityID
IS
NOT
NULL
THEN
SET
@
stmtStr
=
CONCAT
(
'INSERT IGNORE INTO `'
,
tableName
,
'` (id) SELECT internal_id FROM entity_ids WHERE id =
'
,
EntityID
,
'
'
);
SET
@
stmtStr
=
CONCAT
(
'INSERT IGNORE INTO `'
,
tableName
,
'` (id) SELECT internal_id FROM entity_ids WHERE id =
?
'
);
PREPARE
stmt
FROM
@
stmtStr
;
EXECUTE
stmt
;
SET
@
eid
=
EntityID
;
EXECUTE
stmt
USING
@
eid
;
SET
ecount
=
ecount
+
ROW_COUNT
();
DEALLOCATE
PREPARE
stmt
;
END
IF
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment