diff --git a/procedures/query/applyPOV.sql b/procedures/query/applyPOV.sql index 58fed6171869251939cb42fe8fb0df756fe417a6..cebacf717da76ec8d26ae5878c712331ab20f615 100644 --- a/procedures/query/applyPOV.sql +++ b/procedures/query/applyPOV.sql @@ -21,14 +21,20 @@ * ** end header */ +/* Documentation including (?) has to be checked by an expert. */ + DROP PROCEDURE IF EXISTS db_2_0.applyPOV; DELIMITER // -CREATE PROCEDURE db_2_0.applyPOV(in sourceSet VARCHAR(255), - in targetSet VARCHAR(255), +CREATE PROCEDURE db_2_0.applyPOV(in sourceSet VARCHAR(255), /* (?) Name of the table that the POV will be applied to. This can be a temporary table. */ + in targetSet VARCHAR(255), /* (?) Name of the result table of this POV. */ in propertiesTable VARCHAR(255), in refIdsTable VARCHAR(255), - in o CHAR(4), + in o CHAR(4), /* The operator for this operation. can be one of: + 0 check for "equals NULL" + !0 check for "not NULL" + -> check whether a reference exists + */ in vText VARCHAR(255), in vInt INT, in vDouble DOUBLE, @@ -65,6 +71,8 @@ POV_LABEL: BEGIN SET vText = NULL; SET sTextData = 'SELECT domain_id, entity_id, property_id FROM `null_data` AS subdata'; + /* Question: in !0 the query is explicitly checked for NOT NULL. Aren't these NULL entries forgotten here? */ + ELSEIF o = '!0' THEN #-- special case: property IS NOT NULL #-- generate statement parts