Skip to content

Commit 83f2ca2

Browse files
authored
Merge pull request #1595 from iTerminate/master
Release CDB Path
2 parents 23b2939 + 81c427f commit 83f2ca2

File tree

9 files changed

+56
-7
lines changed

9 files changed

+56
-7
lines changed

db/sql/updates/updateTo3.15.4.sql

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
--
2+
-- Copyright (c) UChicago Argonne, LLC. All rights reserved.
3+
-- See LICENSE file.
4+
--
5+
6+
-- Execute by running `mysql CDB_DB_NAME --host=127.0.0.1 --user=cdb -p < updateTo3.15.4.sql`
7+
8+
9+
delimiter //
10+
11+
DROP PROCEDURE IF EXISTS is_item_relationship_have_circular_reference;//
12+
CREATE PROCEDURE `is_item_relationship_have_circular_reference` (IN relationship_type_id int, IN parent_item_id int, IN proposed_child_item_id int)
13+
BEGIN
14+
-- Get all parents for the existing parent item.
15+
SELECT * FROM item WHERE ID IN (
16+
WITH RECURSIVE parent_relationship_hierarchy AS (
17+
SELECT *
18+
FROM v_relationship_hierarchy vrh
19+
WHERE vrh.child_item_id = parent_item_id
20+
AND vrh.relationship_type_id = relationship_type_id
21+
UNION
22+
SELECT vrh2.*
23+
FROM v_relationship_hierarchy vrh2, parent_relationship_hierarchy a
24+
WHERE vrh2.child_item_id = a.parent_item_id
25+
AND vrh2.relationship_type_id = relationship_type_id
26+
)
27+
SELECT prh.parent_item_id
28+
FROM parent_relationship_hierarchy prh
29+
) and ID IN (
30+
-- Compare if any children match the parent in proposed children items.
31+
SELECT id FROM item WHERE
32+
-- Ensure single level circular reference doesn't occur.
33+
ID = proposed_child_item_id
34+
OR ID IN (
35+
WITH RECURSIVE child_relationship_hierarchy AS (
36+
SELECT *
37+
FROM v_relationship_hierarchy vrh
38+
WHERE vrh.parent_item_id = proposed_child_item_id
39+
AND vrh.relationship_type_id = relationship_type_id
40+
UNION
41+
SELECT vrh2.*
42+
FROM v_relationship_hierarchy vrh2, child_relationship_hierarchy a
43+
WHERE vrh2.parent_item_id = a.child_item_id
44+
AND vrh2.relationship_type_id = relationship_type_id
45+
)
46+
SELECT crh.child_item_id
47+
FROM child_relationship_hierarchy crh)
48+
);
49+
END //

etc/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.15.3
1+
3.15.4

src/java/CdbWebPortal/src/java/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ prettyPrint: true
44
cacheTTL: 0
55
openAPI:
66
info:
7-
version: '3.15.3'
7+
version: '3.15.4'
88
title: Component Database API
99
description: 'The API that provides access to Component Database data.'
1010
contact:

tools/developer_tools/python-client/conda-recipe/API/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "ComponentDB-API" %}
2-
{% set version = "3.15.3" %}
2+
{% set version = "3.15.4" %}
33

44
package:
55
name: "{{ name|lower }}"

tools/developer_tools/python-client/conda-recipe/CLI/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "ComponentDB-CLI" %}
2-
{% set version = "3.15.3" %}
2+
{% set version = "3.15.4" %}
33

44
package:
55
name: "{{ name|lower }}"

tools/developer_tools/python-client/setup-api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from setuptools import find_packages
1717

1818
setup(name='ComponentDB-API',
19-
version='3.15.3',
19+
version='3.15.4',
2020
packages=["cdbApi",
2121
"cdbApi.api",
2222
"cdbApi.models"],

tools/developer_tools/python-client/setup-cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from setuptools import find_packages
1717

1818
setup(name='ComponentDB-CLI',
19-
version='3.15.3',
19+
version='3.15.4',
2020
packages=['cdbCli',
2121
'cdbCli.common',
2222
'cdbCli.common.cli',
@@ -32,7 +32,7 @@
3232
'pandas',
3333
'rich',
3434
'InquirerPy',
35-
'ComponentDB-API==3.15.2'],
35+
'ComponentDB-API==3.15.4'],
3636
license='Copyright (c) UChicago Argonne, LLC. All rights reserved.',
3737
description='Python APIs used to communicate with java hosted ComponentDB API.',
3838
maintainer='Dariusz Jarosz',

0 commit comments

Comments
 (0)