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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
5e2f03b9
Verified
Commit
5e2f03b9
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
Some code comments
parent
071860e3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+0
-1
0 additions, 1 deletion
CHANGELOG.md
procedures/entityVersioning.sql
+9
-0
9 additions, 0 deletions
procedures/entityVersioning.sql
with
9 additions
and
1 deletion
CHANGELOG.md
+
0
−
1
View file @
5e2f03b9
...
@@ -19,4 +19,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
...
@@ -19,4 +19,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ###
### Fixed ###
-
Fixed several bugs when an Entity inherits from itself (#18, caosdb-server #85).
-
Fixed several bugs when an Entity inherits from itself (#18, caosdb-server #85).
>>>>>>> dev
This diff is collapsed.
Click to expand it.
procedures/entityVersioning.sql
+
9
−
0
View file @
5e2f03b9
...
@@ -125,6 +125,11 @@ BEGIN
...
@@ -125,6 +125,11 @@ BEGIN
END
;
END
;
//
//
-- This implementation assumes that the distance from the head equals the
-- difference between the _iversion numbers. This will not be correct anymore,
-- as soon as branches may split and merge. Then, an tree-walk will be
-- necessary, traversing the primary parents (_pparent), will be necessary.
DROP
FUNCTION
IF
EXISTS
db_2_0
.
get_head_relative
//
DROP
FUNCTION
IF
EXISTS
db_2_0
.
get_head_relative
//
CREATE
FUNCTION
db_2_0
.
get_head_relative
(
CREATE
FUNCTION
db_2_0
.
get_head_relative
(
EntityID
INT
UNSIGNED
,
EntityID
INT
UNSIGNED
,
...
@@ -157,6 +162,10 @@ BEGIN
...
@@ -157,6 +162,10 @@ BEGIN
WHERE
c
.
entity_id
=
EntityID
WHERE
c
.
entity_id
=
EntityID
AND
c
.
_ipparent
is
Null
AND
c
.
_ipparent
is
Null
-- TODO This first SELECT statement is necessary because the second one
-- does not return the root. However, this should be doable in one go with
-- a left join.
-- retrieve branches
-- retrieve branches
UNION
SELECT
c
.
version
AS
child
,
UNION
SELECT
c
.
version
AS
child
,
p
.
version
AS
parent
,
p
.
version
AS
parent
,
...
...
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