liquid_feedback_core

changeset 243:d2642db42ad0

Comments on delegation information functions
author jbe
date Thu May 10 18:24:36 2012 +0200 (2012-05-10)
parents 0c5ddf9b4b20
children d09c17b01c5d
files core.sql
line diff
     1.1 --- a/core.sql	Thu May 10 15:07:00 2012 +0200
     1.2 +++ b/core.sql	Thu May 10 18:24:36 2012 +0200
     1.3 @@ -2377,7 +2377,7 @@
     1.4          "disabled_out"          BOOLEAN,
     1.5          "loop"                  "delegation_chain_loop_tag" );
     1.6  
     1.7 -COMMENT ON TYPE "delegation_chain_row" IS 'Type of rows returned by "delegation_chain"(...) functions';
     1.8 +COMMENT ON TYPE "delegation_chain_row" IS 'Type of rows returned by "delegation_chain" function';
     1.9  
    1.10  COMMENT ON COLUMN "delegation_chain_row"."index"         IS 'Index starting with 0 and counting up';
    1.11  COMMENT ON COLUMN "delegation_chain_row"."participation" IS 'In case of delegation chains for issues: interest, for areas: membership, for global delegation chains: always null';
    1.12 @@ -2652,6 +2652,9 @@
    1.13  CREATE TYPE "delegation_info_loop_type" AS ENUM
    1.14    ('own', 'first', 'first_ellipsis', 'other', 'other_ellipsis');
    1.15  
    1.16 +COMMENT ON TYPE "delegation_info_loop_type" IS 'Type of "delegation_loop" in "delegation_info_type"; ''own'' means loop to self, ''first'' means loop to first trustee, ''first_ellipsis'' means loop to ellipsis after first trustee, ''other'' means loop to other trustee, ''other_ellipsis'' means loop to ellipsis after other trustee''';
    1.17 +
    1.18 +
    1.19  CREATE TYPE "delegation_info_type" AS (
    1.20          "own_participation"           BOOLEAN,
    1.21          "own_delegation_scope"        "delegation_scope",
    1.22 @@ -2663,6 +2666,19 @@
    1.23          "other_trustee_ellipsis"      BOOLEAN,
    1.24          "delegation_loop"             "delegation_info_loop_type");
    1.25  
    1.26 +COMMENT ON TYPE "delegation_info_type" IS 'Type of result returned by "delegation_info" function; For meaning of "participation" check comment on "delegation_chain_row" type';
    1.27 +
    1.28 +COMMENT ON COLUMN "delegation_info_type"."own_participation"           IS 'Member is directly participating';
    1.29 +COMMENT ON COLUMN "delegation_info_type"."own_delegation_scope"        IS 'Delegation scope of member';
    1.30 +COMMENT ON COLUMN "delegation_info_type"."first_trustee_id"            IS 'Direct trustee of member';
    1.31 +COMMENT ON COLUMN "delegation_info_type"."first_trustee_participation" IS 'Direct trustee of member is participating';
    1.32 +COMMENT ON COLUMN "delegation_info_type"."first_trustee_ellipsis"      IS 'Ellipsis in delegation chain after "first_trustee"';
    1.33 +COMMENT ON COLUMN "delegation_info_type"."other_trustee_id"            IS 'Another relevant trustee (due to participation)';
    1.34 +COMMENT ON COLUMN "delegation_info_type"."other_trustee_participation" IS 'Another trustee is participating (redundant field: if "other_trustee_id" is set, then "other_trustee_participation" is always TRUE, else "other_trustee_participation" is NULL)';
    1.35 +COMMENT ON COLUMN "delegation_info_type"."other_trustee_ellipsis"      IS 'Ellipsis in delegation chain after "other_trustee"';
    1.36 +COMMENT ON COLUMN "delegation_info_type"."delegation_loop"             IS 'Non-NULL value, if delegation chain contains a circle; See comment on "delegation_info_loop_type" for details';
    1.37 +
    1.38 +
    1.39  CREATE FUNCTION "delegation_info"
    1.40    ( "member_id_p"           "member"."id"%TYPE,
    1.41      "unit_id_p"             "unit"."id"%TYPE,
    1.42 @@ -2726,6 +2742,14 @@
    1.43      END;
    1.44    $$;
    1.45  
    1.46 +COMMENT ON FUNCTION "delegation_info"
    1.47 +  ( "member"."id"%TYPE,
    1.48 +    "unit"."id"%TYPE,
    1.49 +    "area"."id"%TYPE,
    1.50 +    "issue"."id"%TYPE,
    1.51 +    "member"."id"%TYPE )
    1.52 +  IS 'Notable information about a delegation chain for unit, area, or issue; See "delegation_info_type" for more information';
    1.53 +
    1.54  
    1.55  
    1.56  ------------------------------

Impressum / About Us