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
50acb681
Verified
Commit
50acb681
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: String IDs
parent
f5dbeccc
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
#41661
failed
1 year ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
procedures/query/applyIDFilter.sql
+13
-4
13 additions, 4 deletions
procedures/query/applyIDFilter.sql
with
13 additions
and
4 deletions
procedures/query/applyIDFilter.sql
+
13
−
4
View file @
50acb681
...
@@ -54,19 +54,28 @@ CREATE PROCEDURE db_5_0.applyIDFilter(in sourceSet VARCHAR(255), in targetSet VA
...
@@ -54,19 +54,28 @@ CREATE PROCEDURE db_5_0.applyIDFilter(in sourceSet VARCHAR(255), in targetSet VA
IDFILTER_LABEL
:
BEGIN
IDFILTER_LABEL
:
BEGIN
DECLARE
data
VARCHAR
(
20000
)
DEFAULT
NULL
;
DECLARE
data
VARCHAR
(
20000
)
DEFAULT
NULL
;
DECLARE
aggVal
VARCHAR
(
255
)
DEFAULT
NULL
;
DECLARE
aggVal
VARCHAR
(
255
)
DEFAULT
NULL
;
DECLARE
direction
CHAR
(
4
)
DEFAULT
NULL
;
#
-- get aggVal if possible
#
-- get aggVal if possible
IF
agg
IS
NOT
NULL
THEN
IF
agg
IS
NOT
NULL
THEN
IF
versioned
THEN
IF
versioned
THEN
-- TODO versioned queries
-- TODO versioned queries
SELECT
1
FROM
id_agg_with_versioning_not_implemented
;
SELECT
1
FROM
id_agg_with_versioning_not_implemented
;
ELSEIF
agg
=
"max"
THEN
SET
direction
=
"DESC"
;
ELSEIF
agg
=
"min"
THEN
SET
direction
=
"ASC "
;
ELSE
SELECT
1
FROM
unknown_agg_parameter
;
END
IF
;
END
IF
;
SET
@
stmtIDAggValStr
=
CONCAT
(
SET
@
stmtIDAggValStr
=
CONCAT
(
"SELECT "
,
"SELECT e.internal_id INTO @sAggVal FROM `"
,
agg
,
"(id) INTO @sAggVal FROM `"
,
sourceSet
,
sourceSet
,
"`"
);
"` AS s LEFT JOIN entity_ids AS e ON (s.id=e.internal_id) WHERE s.id>99 ORDER BY CAST(e.id AS UNSIGNED INT) "
,
direction
,
" LIMIT 1"
);
PREPARE
stmtIDAggVal
FROM
@
stmtIDAggValStr
;
PREPARE
stmtIDAggVal
FROM
@
stmtIDAggValStr
;
EXECUTE
stmtIDAggVal
;
EXECUTE
stmtIDAggVal
;
DEALLOCATE
PREPARE
stmtIDAggVal
;
DEALLOCATE
PREPARE
stmtIDAggVal
;
...
...
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