From 2554332da71a2b8758dc15f1be1ac0258f3dca17 Mon Sep 17 00:00:00 2001 From: Alexander Schlemmer <alexander.schlemmer@ds.mpg.de> Date: Sun, 6 Oct 2019 15:51:42 +0200 Subject: [PATCH] DOC: more documentation --- procedures/query/applyPOV.sql | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/procedures/query/applyPOV.sql b/procedures/query/applyPOV.sql index 58fed61..cebacf7 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 -- GitLab