@@ -2,20 +2,95 @@ import { AllCommentNodes } from "sql-parser-cst";
22import { group , indent , line } from "../print_utils" ;
33import { CstToDocMap } from "../CstToDocMap" ;
44
5- export const commentMap : Partial < CstToDocMap < AllCommentNodes > > = {
5+ export const commentMap : CstToDocMap < AllCommentNodes > = {
66 comment_stmt : ( print ) =>
77 group ( [
88 print . spaced ( [ "commentKw" , "onKw" , "target" , "isKw" ] ) ,
99 indent ( [ line , print ( "message" ) ] ) ,
1010 ] ) ,
1111
12+ comment_target_aggregate : ( print ) =>
13+ group ( [ print . spaced ( [ "aggregateKw" , "name" ] ) , print ( [ "params" ] ) ] ) ,
1214 comment_target_function : ( print ) =>
1315 group ( [ print . spaced ( [ "functionKw" , "name" ] ) , print ( [ "params" ] ) ] ) ,
14- comment_target_table : ( print ) => group ( print . spaced ( [ "tableKw" , "name" ] ) ) ,
16+ comment_target_procedure : ( print ) =>
17+ group ( [ print . spaced ( [ "procedureKw" , "name" ] ) , print ( [ "params" ] ) ] ) ,
18+ comment_target_routine : ( print ) =>
19+ group ( [ print . spaced ( [ "routineKw" , "name" ] ) , print ( [ "params" ] ) ] ) ,
20+
21+ comment_target_access_method : ( print ) =>
22+ group ( print . spaced ( [ "accessMethodKw" , "name" ] ) ) ,
23+ comment_target_cast : ( print ) => group ( print . spaced ( [ "castKw" , "args" ] ) ) ,
24+ comment_target_collation : ( print ) =>
25+ group ( print . spaced ( [ "collationKw" , "name" ] ) ) ,
26+ comment_target_column : ( print ) => group ( print . spaced ( [ "columnKw" , "name" ] ) ) ,
1527 comment_target_table_constraint : ( print ) =>
1628 group ( print . spaced ( [ "constraintKw" , "name" , "onKw" , "tableName" ] ) ) ,
1729 comment_target_domain_constraint : ( print ) =>
1830 group (
1931 print . spaced ( [ "constraintKw" , "name" , "onKw" , "domainKw" , "domainName" ] ) ,
2032 ) ,
33+ comment_target_conversion : ( print ) =>
34+ group ( print . spaced ( [ "conversionKw" , "name" ] ) ) ,
35+ comment_target_database : ( print ) =>
36+ group ( print . spaced ( [ "databaseKw" , "name" ] ) ) ,
37+ comment_target_domain : ( print ) => group ( print . spaced ( [ "domainKw" , "name" ] ) ) ,
38+ comment_target_extension : ( print ) =>
39+ group ( print . spaced ( [ "extensionKw" , "name" ] ) ) ,
40+ comment_target_event_trigger : ( print ) =>
41+ group ( print . spaced ( [ "eventTriggerKw" , "name" ] ) ) ,
42+ comment_target_foreign_data_wrapper : ( print ) =>
43+ group ( print . spaced ( [ "foreignDataWrapperKw" , "name" ] ) ) ,
44+ comment_target_foreign_table : ( print ) =>
45+ group ( print . spaced ( [ "foreignTableKw" , "name" ] ) ) ,
46+ comment_target_index : ( print ) => group ( print . spaced ( [ "indexKw" , "name" ] ) ) ,
47+ comment_target_language : ( print ) =>
48+ group ( print . spaced ( [ "languageKw" , "name" ] ) ) ,
49+ comment_target_large_object : ( print ) =>
50+ group ( print . spaced ( [ "largeObjectKw" , "oid" ] ) ) ,
51+ comment_target_materialized_view : ( print ) =>
52+ group ( print . spaced ( [ "materializedViewKw" , "name" ] ) ) ,
53+ comment_target_operator_class : ( print ) =>
54+ group ( print . spaced ( [ "operatorClassKw" , "name" , "usingKw" , "methodName" ] ) ) ,
55+ comment_target_operator_family : ( print ) =>
56+ group ( print . spaced ( [ "operatorFamilyKw" , "name" , "usingKw" , "methodName" ] ) ) ,
57+ comment_target_policy : ( print ) =>
58+ group ( print . spaced ( [ "policyKw" , "name" , "onKw" , "tableName" ] ) ) ,
59+ comment_target_publication : ( print ) =>
60+ group ( print . spaced ( [ "publicationKw" , "name" ] ) ) ,
61+ comment_target_role : ( print ) => group ( print . spaced ( [ "roleKw" , "name" ] ) ) ,
62+ comment_target_rule : ( print ) =>
63+ group ( print . spaced ( [ "ruleKw" , "name" , "onKw" , "tableName" ] ) ) ,
64+ comment_target_schema : ( print ) => group ( print . spaced ( [ "schemaKw" , "name" ] ) ) ,
65+ comment_target_sequence : ( print ) =>
66+ group ( print . spaced ( [ "sequenceKw" , "name" ] ) ) ,
67+ comment_target_server : ( print ) => group ( print . spaced ( [ "serverKw" , "name" ] ) ) ,
68+ comment_target_statistics : ( print ) =>
69+ group ( print . spaced ( [ "statisticsKw" , "name" ] ) ) ,
70+ comment_target_subscription : ( print ) =>
71+ group ( print . spaced ( [ "subscriptionKw" , "name" ] ) ) ,
72+ comment_target_table : ( print ) => group ( print . spaced ( [ "tableKw" , "name" ] ) ) ,
73+ comment_target_tablespace : ( print ) =>
74+ group ( print . spaced ( [ "tablespaceKw" , "name" ] ) ) ,
75+ comment_target_text_search_configuration : ( print ) =>
76+ group ( print . spaced ( [ "textSearchConfigurationKw" , "name" ] ) ) ,
77+ comment_target_text_search_dictionary : ( print ) =>
78+ group ( print . spaced ( [ "textSearchDictionaryKw" , "name" ] ) ) ,
79+ comment_target_text_search_parser : ( print ) =>
80+ group ( print . spaced ( [ "textSearchParserKw" , "name" ] ) ) ,
81+ comment_target_text_search_template : ( print ) =>
82+ group ( print . spaced ( [ "textSearchTemplateKw" , "name" ] ) ) ,
83+ comment_target_transform : ( print ) =>
84+ group (
85+ print . spaced ( [
86+ "transformForKw" ,
87+ "typeName" ,
88+ "languageKw" ,
89+ "languageName" ,
90+ ] ) ,
91+ ) ,
92+ comment_target_trigger : ( print ) =>
93+ group ( print . spaced ( [ "triggerKw" , "name" , "onKw" , "tableName" ] ) ) ,
94+ comment_target_type : ( print ) => group ( print . spaced ( [ "typeKw" , "name" ] ) ) ,
95+ comment_target_view : ( print ) => group ( print . spaced ( [ "viewKw" , "name" ] ) ) ,
2196} ;
0 commit comments