diff --git a/uno/.gitrepo b/uno/.gitrepo index b9d5a30a..34a2fe3a 100644 --- a/uno/.gitrepo +++ b/uno/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = https://github.com/prrvchr/uno.git branch = main - commit = 67a17a47c21a6825a0f5198424b5b61878f56f3b - parent = d680edc1e0624d2b28b0a9ff02a38d5e59fef01c + commit = d1faab959e801b9780eb6e2aed95c2ee30309b4e + parent = 2a0333ee65cf84614e3fb99f781f3a39201a3107 method = merge cmdver = 0.4.3 diff --git a/uno/lib/uno/card/dbqueries.py b/uno/lib/uno/card/dbqueries.py index b79410ce..96c54d87 100644 --- a/uno/lib/uno/card/dbqueries.py +++ b/uno/lib/uno/card/dbqueries.py @@ -740,14 +740,18 @@ def getSqlQuery(ctx, name, format=None): # The getTypes query allows to obtain the right label (column) for typed properties elif name == 'createSelectTypes': query = """\ -CREATE PROCEDURE "SelectTypes"() +CREATE PROCEDURE "SelectTypes"(IN COMPOSE BOOLEAN) SPECIFIC "SelectTypes_1" READS SQL DATA DYNAMIC RESULT SETS 1 BEGIN ATOMIC DECLARE Rslt CURSOR WITH RETURN FOR SELECT R."Path", R."Name", P."Path", - ARRAY_AGG(JSON_OBJECT(T."Path" || P2."Path": COALESCE(T."Name", '') || P2."Name")) + CASE WHEN COMPOSE THEN + ARRAY_AGG(JSON_OBJECT(T."Path" || P2."Path": COALESCE(T."Name", '') || P2."Name")) + ELSE + ARRAY_AGG(JSON_OBJECT(T."Path": COALESCE(T."Name", '') || P2."Name")) + END FROM "Resources" AS R INNER JOIN "Properties" AS P ON R."Resource"=P."Resource" INNER JOIN "Resources" AS R2 ON R."Resource"=R2."Resource" @@ -795,7 +799,7 @@ def getSqlQuery(ctx, name, format=None): elif name == 'createSelectGroups': query = """\ -CREATE PROCEDURE "SelectGroups"(IN Aid Integer) +CREATE PROCEDURE "SelectGroups"(IN Aid INTEGER) SPECIFIC "SelectGroups_1" READS SQL DATA DYNAMIC RESULT SETS 1 @@ -983,7 +987,7 @@ def getSqlQuery(ctx, name, format=None): elif name == 'getLists': query = 'CALL "SelectLists"()' elif name == 'getTypes': - query = 'CALL "SelectTypes"()' + query = 'CALL "SelectTypes"(?)' elif name == 'getMaps': query = 'CALL "SelectMaps"()' elif name == 'getTmps':