Changeset: 96918faff9c9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=96918faff9c9
Modified Files:
        clients/mapiclient/mhelp.c
Branch: Nov2019
Log Message:

Improved CREATE TRIGGER syntax. Added and improved help text. Added doc URL ref 
for CREATE INDEX.


diffs (100 lines):

diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -87,7 +87,7 @@ SQLhelp sqlhelp1[] = {
        {"ANALYZE",
         "Collect column/table/schema data statistics for analysis and 
optimizer usage",
         "ANALYZE ident [ . ident [ column_list ] ] [SAMPLE size] [MINMAX]",
-        "column_list",
+        "ident,column_list",
         "See also 
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics"},
        {"CALL",
         "",
@@ -163,10 +163,10 @@ SQLhelp sqlhelp1[] = {
         
"qname,param,data_type,function_return,statement,ident,language_keyword,external_code",
         "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Functions"},
        {"CREATE INDEX",
-        "",
+        "Create a hint for a secondary index on a column or set of columns of 
a table",
         "CREATE [ UNIQUE | ORDERED | IMPRINTS ] INDEX ident ON qname '(' 
ident_list ')'",
         NULL,
-        NULL},
+        "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Indices"},
        {"CREATE PROCEDURE",
         "Create a user-defined procedure",
         "CREATE [ OR REPLACE ] PROCEDURE qname '(' { '*' | [ param [',' ...]] 
} ')'\n"
@@ -203,12 +203,12 @@ SQLhelp sqlhelp1[] = {
         "ident",
         "See also https://www.monetdb.org/Documentation/SQLreference/Roles"},
        {"CREATE SCHEMA",
-        "",
+        "Create a new schema",
         "CREATE SCHEMA [ IF NOT EXISTS ] schema_name [default_char_set] 
[path_spec] [schema_element]",
         "schema_name,default_char_set,path_spec,schema_element",
         "See also https://www.monetdb.org/Documentation/SQLreference/Schema"},
        {"CREATE SEQUENCE",
-        "Define a new sequence generator",
+        "Define a new integer number sequence generator",
         "CREATE SEQUENCE ident [ AS data_type] [ START [WITH start]] 
[INCREMENT BY increment]\n"
         "[MINVALUE minvalue | NO MINVALUE] [MAXVALUE maxvalue | NO MAXVALUE] 
[CACHE cachevalue] [[NO] CYCLE]",
         "ident,data_type",
@@ -219,17 +219,18 @@ SQLhelp sqlhelp1[] = {
         "table_source",
         NULL},
        {"CREATE TABLE",
-        "",
+        "Create a new table",
         "CREATE TABLE [ IF NOT EXISTS ] qname table_source [STORAGE ident 
string]\n"
         "CREATE TABLE [ IF NOT EXISTS ] qname FROM LOADER function_ref\n"
         "CREATE [ LOCAL | GLOBAL ] { TEMPORARY | TEMP } TABLE [ IF NOT EXISTS 
] qname table_source [on_commit]",
         "table_source,on_commit,function_ref",
         "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Tables"},
        {"CREATE TRIGGER",
-        "",
-        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER } { INSERT | 
DELETE | TRUNCATE ...\n"
-        " | UPDATE [ OF ident [',' ident]] } ON qname REFERENCING 
trigger_reference... triggered_action",
-        "qname,trigger_reference,triggered_action",
+        "Define a triggered action for a table data update event",
+        "CREATE [ OR REPLACE ] TRIGGER qname { BEFORE | AFTER }\n"
+        " { INSERT | DELETE | TRUNCATE | UPDATE [ OF ident_list ] }\n"
+        " ON qname [ REFERENCING trigger_reference [...] ] triggered_action",
+        "qname,ident_list,trigger_reference,triggered_action",
         "See also 
https://www.monetdb.org/Documentation/SQLreference/Triggers"},
        {"CREATE TYPE",
         "Add user defined type to the type system ",
@@ -237,12 +238,12 @@ SQLhelp sqlhelp1[] = {
         NULL,
         NULL},
        {"CREATE USER",
-        "Create a new user",
+        "Create a new database user",
         "CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME 
string SCHEMA ident",
         "ident",
         "See also https://www.monetdb.org/Documentation/SQLreference/Users"},
        {"CREATE VIEW",
-        "",
+        "Create a new view",
         "CREATE [ OR REPLACE ] VIEW qname [ column_list ] AS { 
query_expression | '(' query_expression ')' }\n"
         "[ WITH CHECK OPTION ]",
         "qname,column_list,query_expression",
@@ -850,7 +851,7 @@ SQLhelp sqlhelp2[] = {
         NULL},
        {"trigger_reference",
         NULL,
-        "OLD [ROW] [AS] ident | NEW [ROW] [AS] ident",
+        "{ OLD | NEW } { [ROW] | TABLE } [AS] ident",
         NULL,
         NULL},
        {"update_statement",
@@ -860,8 +861,9 @@ SQLhelp sqlhelp2[] = {
         NULL},
        {"triggered_action",
         NULL,
-        "[ FOR EACH { ROW | STATEMENT } ] [ WHEN '(' search_condition ')'\n"
-        "        BEGIN ATOMIC trigger_statement ... END ",
+        "[ FOR [EACH] { ROW | STATEMENT } ]\n"
+        "[ WHEN '(' search_condition ')' ]\n"
+        "{ trigger_statement | BEGIN ATOMIC trigger_statement [ ; ... ] END }",
         "trigger_statement,search_condition",
         NULL},
        {"trigger_statement",
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to