Skip to content

Commit fdbb7cc

Browse files
author
jialan
committed
feat: update snippet label
1 parent cba61b3 commit fdbb7cc

7 files changed

Lines changed: 78 additions & 78 deletions

File tree

src/languages/flink/flink.snippet.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { CompletionSnippetOption } from 'src/monaco.contribution';
22

33
export const flinkSnippets: CompletionSnippetOption[] = [
44
{
5-
label: 'create source table',
5+
label: 'create-source-table',
66
prefix: 'CREATE-SOURCE-TABLE',
77
body: [
88
'CREATE TABLE ${1:source_table} (',
@@ -20,7 +20,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
2020
]
2121
},
2222
{
23-
label: 'create sink table',
23+
label: 'create-sink-table',
2424
prefix: 'CREATE-SINK-TABLE',
2525
body: [
2626
'CREATE TABLE ${1:sink_table} (',
@@ -36,7 +36,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
3636
]
3737
},
3838
{
39-
label: 'tumble window',
39+
label: 'tumble-window',
4040
prefix: 'TUMBLE-WINDOW',
4141
body: [
4242
'SELECT',
@@ -53,7 +53,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
5353
]
5454
},
5555
{
56-
label: 'hop window',
56+
label: 'hop-window',
5757
prefix: 'HOP-WINDOW',
5858
body: [
5959
'SELECT',
@@ -71,7 +71,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
7171
]
7272
},
7373
{
74-
label: 'comulate window',
74+
label: 'comulate-window',
7575
prefix: 'CUMULATE-WINDOW',
7676
body: [
7777
'SELECT',
@@ -89,7 +89,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
8989
]
9090
},
9191
{
92-
label: 'session window',
92+
label: 'session-window',
9393
prefix: 'SESSION-WINDOW',
9494
body: [
9595
'SELECT',
@@ -103,7 +103,7 @@ export const flinkSnippets: CompletionSnippetOption[] = [
103103
]
104104
},
105105
{
106-
label: 'insert into',
106+
label: 'insert-into-select',
107107
prefix: 'INSERT-INTO-SELECT',
108108
body: [
109109
'INSERT INTO ${1:table_name}',

src/languages/hive/hive.snippet.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export const hiveSnippets: CompletionSnippetOption[] = [
77
body: ['SELECT ${2:column1}, ${3:column2} FROM ${1:table_name};\n$4']
88
},
99
{
10-
label: 'select join',
10+
label: 'select-join',
1111
prefix: 'SELECT-JOIN',
1212
body: [
1313
'SELECT ${8:column1} FROM ${1:table_name} ${2:t1}',
1414
'${3:LEFT} JOIN ${4:table2} ${5:t2} ON ${2:t1}.${6:column1} = ${5:t2}.${7:column2};\n$9'
1515
]
1616
},
1717
{
18-
label: 'select order-by',
18+
label: 'select-order-by',
1919
prefix: 'SELECT-ORDERBY',
2020
body: [
2121
'SELECT ${2:column1}, ${3:column2} FROM ${1:table_name} ORDER BY ${4:column1} ${5:desc};\n$6'
@@ -29,7 +29,7 @@ export const hiveSnippets: CompletionSnippetOption[] = [
2929
]
3030
},
3131
{
32-
label: 'insert into select',
32+
label: 'insert-into-select',
3333
prefix: 'INSERT-INTO-SELECT',
3434
body: [
3535
'INSERT INTO TABLE ${1:table_name}',
@@ -39,8 +39,8 @@ export const hiveSnippets: CompletionSnippetOption[] = [
3939
]
4040
},
4141
{
42-
label: 'insert overwrite table',
43-
prefix: 'INSERT-OVERWRITE',
42+
label: 'insert-overwrite-table',
43+
prefix: 'INSERT-OVERWRITE-TABLE',
4444
body: [
4545
'INSERT OVERWRITE TABLE ${1:table_name}',
4646
'SELECT ${3:column1}, ${4:column2}',
@@ -63,7 +63,7 @@ export const hiveSnippets: CompletionSnippetOption[] = [
6363
body: ['DELETE FROM ${1:table_name}', 'WHERE ${2:column1} = ${3:value1};\n$4']
6464
},
6565
{
66-
label: 'create table',
66+
label: 'create-table',
6767
prefix: 'CREATE-TABLE',
6868
body: [
6969
'CREATE TABLE IF NOT EXISTS ${1:table_name} (',
@@ -77,7 +77,7 @@ export const hiveSnippets: CompletionSnippetOption[] = [
7777
]
7878
},
7979
{
80-
label: 'create table as select',
80+
label: 'create-table-as-select',
8181
prefix: 'CREATE-TABLE-AS-SELECT',
8282
body: [
8383
'CREATE TABLE IF NOT EXISTS ${1:table_name}',
@@ -88,7 +88,7 @@ export const hiveSnippets: CompletionSnippetOption[] = [
8888
]
8989
},
9090
{
91-
label: 'create partition table',
91+
label: 'create-partition-table',
9292
prefix: 'CREATE-PARTITION-TABLE',
9393
body: [
9494
'CREATE TABLE IF NOT EXISTS ${1:table_name} (',
@@ -103,7 +103,7 @@ export const hiveSnippets: CompletionSnippetOption[] = [
103103
]
104104
},
105105
{
106-
label: 'create bucket table',
106+
label: 'create-bucket-table',
107107
prefix: 'CREATE-BUCKET-TABLE',
108108
body: [
109109
'CREATE TABLE IF NOT EXISTS ${1:table_name} (',
@@ -119,21 +119,21 @@ export const hiveSnippets: CompletionSnippetOption[] = [
119119
]
120120
},
121121
{
122-
label: 'alter table partition',
122+
label: 'alter-table-partition',
123123
prefix: 'ALTER-TABLE-PARTITION',
124124
body: [
125125
"ALTER TABLE ${1:table_name} ${2:ADD} PARTITION (${3:part_column}='${4:part_value}');\n$5"
126126
]
127127
},
128128
{
129-
label: 'alter table properties',
129+
label: 'alter-table-properties',
130130
prefix: 'ALTER-TABLE-PROPERTIES',
131131
body: [
132132
"ALTER TABLE ${1:table_name} SET TBLPROPERTIES ('${2:property_name}'='${3:property_value}');\n$4"
133133
]
134134
},
135135
{
136-
label: 'alter table columns',
136+
label: 'alter-table-columns',
137137
prefix: 'ALTER-TABLE-COLUMNS',
138138
body: [
139139
'ALTER TABLE ${1:table_name} ADD COLUMNS (',

src/languages/impala/impala.snippet.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export const impalaSnippets: CompletionSnippetOption[] = [
77
body: ['SELECT ${2:column1}, ${3:column2} FROM ${1:table_name};\n$4']
88
},
99
{
10-
label: 'select join',
10+
label: 'select-join',
1111
prefix: 'SELECT-JOIN',
1212
body: [
1313
'SELECT ${8:column1} FROM ${1:table_name} ${2:t1}',
1414
'${3:LEFT} JOIN ${4:table2} ${5:t2} ON ${2:t1}.${6:column1} = ${5:t2}.${7:column2};\n$9'
1515
]
1616
},
1717
{
18-
label: 'select order-by',
18+
label: 'select-order-by',
1919
prefix: 'SELECT-ORDER-BY',
2020
body: [
2121
'SELECT ${2:column1}, ${3:column2} FROM ${1:table_name} ORDER BY ${4:column1} ${5:desc};\n$6'
@@ -29,7 +29,7 @@ export const impalaSnippets: CompletionSnippetOption[] = [
2929
]
3030
},
3131
{
32-
label: 'insert into select',
32+
label: 'insert-into-select',
3333
prefix: 'INSERT-INTO-SELECT',
3434
body: [
3535
'INSERT INTO ${1:table_name}',
@@ -39,8 +39,8 @@ export const impalaSnippets: CompletionSnippetOption[] = [
3939
]
4040
},
4141
{
42-
label: 'insert overwrite table',
43-
prefix: 'INSERT-OVERWRITE',
42+
label: 'insert-overwrite-table',
43+
prefix: 'INSERT-OVERWRITE-TABLE',
4444
body: [
4545
'INSERT OVERWRITE TABLE ${1:table_name}',
4646
'SELECT ${3:column1}, ${4:column2}',
@@ -63,7 +63,7 @@ export const impalaSnippets: CompletionSnippetOption[] = [
6363
body: ['DELETE FROM ${1:table_name}', 'WHERE ${2:column1} = ${3:value1};\n$4']
6464
},
6565
{
66-
label: 'create table',
66+
label: 'create-table',
6767
prefix: 'CREATE-TABLE',
6868
body: [
6969
'CREATE TABLE IF NOT EXISTS ${1:table_name} (',
@@ -75,7 +75,7 @@ export const impalaSnippets: CompletionSnippetOption[] = [
7575
]
7676
},
7777
{
78-
label: 'create table as select',
78+
label: 'create-table-as-select',
7979
prefix: 'CREATE-TABLE-AS-SELECT',
8080
body: [
8181
'CREATE TABLE IF NOT EXISTS ${1:table_name}',
@@ -86,7 +86,7 @@ export const impalaSnippets: CompletionSnippetOption[] = [
8686
]
8787
},
8888
{
89-
label: 'create partition table',
89+
label: 'create-partition-table',
9090
prefix: 'CREATE-PARTITION-TABLE',
9191
body: [
9292
'CREATE TABLE IF NOT EXISTS ${1:table_name} (',
@@ -99,21 +99,21 @@ export const impalaSnippets: CompletionSnippetOption[] = [
9999
]
100100
},
101101
{
102-
label: 'alter table partition',
102+
label: 'alter-table-partition',
103103
prefix: 'ALTER-TABLE-PARTITION',
104104
body: [
105105
"ALTER TABLE ${1:table_name} ${2:ADD} PARTITION (${3:part_column} = '${4:part_value}');\n$5"
106106
]
107107
},
108108
{
109-
label: 'alter table properties',
109+
label: 'alter-table-properties',
110110
prefix: 'ALTER-TABLE-PROPERTIES',
111111
body: [
112112
"ALTER TABLE ${1:table_name} SET TBLPROPERTIES ('${2:property_name}' = '${3:property_value}');\n$4"
113113
]
114114
},
115115
{
116-
label: 'alter table column',
116+
label: 'alter-table-column',
117117
prefix: 'ALTER-TABLE-COLUMN',
118118
body: [
119119
"ALTER TABLE ${1:table_name} ADD COLUMN ${2:column_name} ${3:STRING} COMMENT '${4:desc}';\n$5"

src/languages/mysql/mysql.snippet.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
77
body: ['SELECT ${2:column1}, ${3:column2} FROM ${1:table_name};\n$4']
88
},
99
{
10-
label: 'select join',
10+
label: 'select-join',
1111
prefix: 'SELECT-JOIN',
1212
body: [
1313
'SELECT ${8:column1} FROM ${1:table_name} ${2:t1}',
1414
'${3:LEFT} JOIN ${4:table2} ${5:t2} ON ${2:t1}.${6:column1} = ${5:t2}.${7:column2};\n$9'
1515
]
1616
},
1717
{
18-
label: 'select order-by',
18+
label: 'select-order-by',
1919
prefix: 'SELECT-ORDER-BY',
2020
body: [
2121
'SELECT ${2:column1}, ${3:column2} FROM ${1:table_name} ORDER BY ${4:column1} ${5:desc};\n$6'
@@ -29,7 +29,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
2929
]
3030
},
3131
{
32-
label: 'insert into select',
32+
label: 'insert-into-select',
3333
prefix: 'INSERT-INTO-SELECT',
3434
body: [
3535
'INSERT INTO ${1:table_name}',
@@ -39,7 +39,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
3939
]
4040
},
4141
{
42-
label: 'replace into table',
42+
label: 'replace-into-table',
4343
prefix: 'REPLACE-INTO-TABLE',
4444
body: [
4545
'REPLACE INTO ${1:table_name} (${2:column1}, ${3:column2})',
@@ -61,7 +61,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
6161
body: ['DELETE FROM ${1:table_name}', 'WHERE ${2:column1} = ${3:value1};\n$4']
6262
},
6363
{
64-
label: 'create table',
64+
label: 'create-table',
6565
prefix: 'CREATE-TABLE',
6666
body: [
6767
'CREATE TABLE ${1:table_name} (',
@@ -73,7 +73,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
7373
]
7474
},
7575
{
76-
label: 'create table as select',
76+
label: 'create-table-as-select',
7777
prefix: 'CREATE-TABLE-AS-SELECT',
7878
body: [
7979
'CREATE TABLE ${1:table_name}',
@@ -84,7 +84,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
8484
]
8585
},
8686
{
87-
label: 'create table partitioned by range',
87+
label: 'create-table-partitioned-by-range',
8888
prefix: 'CREATE-TABLE-PARTITIONED-BY-RANGE',
8989
body: [
9090
'CREATE TABLE ${1:table_name} (',
@@ -98,7 +98,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
9898
]
9999
},
100100
{
101-
label: 'create table partitioned by list',
101+
label: 'create-table-partitioned-by-list',
102102
prefix: 'CREATE-TABLE-PARTITIONED-BY-LIST',
103103
body: [
104104
'CREATE TABLE ${1:table_name} (',
@@ -112,7 +112,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
112112
]
113113
},
114114
{
115-
label: 'create table partitioned by hash',
115+
label: 'create-table-partitioned-by-hash',
116116
prefix: 'CREATE-TABLE-PARTITIONED-BY-HASH',
117117
body: [
118118
'CREATE TABLE ${1:table_name} (',
@@ -125,7 +125,7 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
125125
]
126126
},
127127
{
128-
label: 'create table partitioned by key',
128+
label: 'create-table-partitioned-by-key',
129129
prefix: 'CREATE-TABLE-PARTITIONED-BY-KEY',
130130
body: [
131131
'CREATE TABLE ${1:table_name} (',
@@ -138,27 +138,27 @@ export const mysqlSnippets: CompletionSnippetOption[] = [
138138
]
139139
},
140140
{
141-
label: 'alter table add column',
141+
label: 'alter-table-add-column',
142142
prefix: 'ALTER-TABLE-ADD-COLUMN',
143143
body: ["ALTER TABLE ${1:table_name} ADD ${2:column_name} ${3:INT} COMMENT '${4:desc}';\n$5"]
144144
},
145145
{
146-
label: 'alter table add partition',
146+
label: 'alter-table-add-partition',
147147
prefix: 'ALTER-TABLE-ADD-PARTITION',
148148
body: ['ALTER TABLE ${1:table_name} ADD PARTITION (', '\t$2', ');\n$4']
149149
},
150150
{
151-
label: 'alter table add index',
151+
label: 'alter-table-add-index',
152152
prefix: 'ALTER-TABLE-ADD-INDEX',
153153
body: ['ALTER TABLE ${1:table_name} ADD INDEX ${2:index_name} (${3:column_name});\n$4']
154154
},
155155
{
156-
label: 'alter table add primary key',
156+
label: 'alter-table-add-primary-key',
157157
prefix: 'ALTER-TABLE-ADD-PRIMARY-KEY',
158158
body: ['ALTER TABLE ${1:table_name} ADD PRIMARY KEY (${2:column_name});\n$3']
159159
},
160160
{
161-
label: 'alter table add constraint',
161+
label: 'alter-table-add-constraint',
162162
prefix: 'ALTER-TABLE-ADD-CONSTRAINT',
163163
body: [
164164
'ALTER TABLE ${1:table_name}',

0 commit comments

Comments
 (0)