-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsnippets.json
388 lines (388 loc) · 8.24 KB
/
snippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
{
"Use namespace": {
"prefix": "use ns",
"body": [
"USE NS $1;"
]
},
"Use database": {
"prefix": "use db",
"body": [
"USE DB $1;"
]
},
"Use namespace and database": {
"prefix": "use ns db",
"body": [
"USE NS $1 DB $1;"
]
},
"Define variable": {
"prefix": "let",
"body": [
"let \\$$1 = $2;"
]
},
"Begin transaction": {
"prefix": "begin",
"body": [
"BEGIN TRANSACTION;"
]
},
"Commit transaction": {
"prefix": "commit",
"body": [
"COMMIT TRANSACTION;"
]
},
"Cancel transaction": {
"prefix": "cancel",
"body": [
"CANCEL TRANSACTION;"
]
},
"IF-statement": {
"prefix": "if",
"body": [
"IF ($1) THEN",
"\t$2;",
"END;"
]
},
"IF-ELSE-statement": {
"prefix": "if else",
"body": [
"IF ($1) THEN",
"\t$2;",
"ELSE",
"\t$3;",
"END;"
]
},
"IF-ELSE-IF-statement": {
"prefix": "if if else",
"body": [
"IF ($1) THEN",
"\t$2;",
"ELSE IF ($3) THEN",
"\t$4;",
"END;"
]
},
"IF-ELSE-IF-ELSE-statement": {
"prefix": "if if else else",
"body": [
"IF ($1) THEN",
"\t$2;",
"ELSE IF ($3) THEN",
"\t$4;",
"ELSE",
"\t$5;",
"END;"
]
},
"Select statement": {
"prefix": "select",
"body": [
"SELECT $1 FROM $2;"
]
},
"Insert statement": {
"prefix": "insert",
"body": [
"INSERT INTO $1 {",
"\t$2",
"};"
]
},
"Insert multiple statement": {
"prefix": "insert multiple",
"body": [
"INSERT INTO $1 [",
"\t{ $2 },",
"];"
]
},
"Insert values statement": {
"prefix": "insert values",
"body": [
"INSERT INTO $1 ($2) VALUES ($3);"
]
},
"Create statement": {
"prefix": "create",
"body": [
"CREATE $1;"
]
},
"Create set statement": {
"prefix": "create set",
"body": [
"CREATE $1 SET $2;"
]
},
"Create content statement": {
"prefix": "create content",
"body": [
"CREATE $1 CONTENT {",
"\t$2",
"};"
]
},
"Update statement": {
"prefix": "update",
"body": [
"UPDATE $1;"
]
},
"Update set statement": {
"prefix": "update set",
"body": [
"UPDATE $1 SET $2;"
]
},
"Update content statement": {
"prefix": "update content",
"body": [
"UPDATE $1 CONTENT {",
"\t$2",
"};"
]
},
"Update merge statement": {
"prefix": "update merge",
"body": [
"UPDATE $1 MERGE {",
"\t$2",
"};"
]
},
"Update patch statement": {
"prefix": "update patch",
"body": [
"UPDATE $1 PATCH [",
"\t{ $2 },",
"];"
]
},
"Relate statement": {
"prefix": "relate",
"body": [
"RELATE $1->$2->$3;"
]
},
"Relate set statement": {
"prefix": "relate set",
"body": [
"RELATE $1->$2->$3 SET $4;"
]
},
"Relate content statement": {
"prefix": "relate content",
"body": [
"RELATE $1->$2->$3 CONTENT {;",
"\t$4",
"};"
]
},
"Delete statement": {
"prefix": "delete",
"body": [
"DELETE $1;"
]
},
"Define a namespace": {
"prefix": "define ns",
"body": [
"DEFINE NAMESPACE $1;"
]
},
"Define a database": {
"prefix": "define db",
"body": [
"DEFINE DATABASE $1;"
]
},
"Define a login": {
"prefix": "define login",
"body": [
"DEFINE LOGIN $1 ON $2 $3;"
]
},
"Define a token": {
"prefix": "define token",
"body": [
"DEFINE TOKEN $1 ON $2 TYPE $3 VALUE $4;"
]
},
"Define a scope": {
"prefix": "define scope",
"body": [
"DEFINE SCOPE $1",
"\tSESSION $2",
"\tSIGNIN ( $3 )",
"\tSIGNUP ( $4 )",
";"
]
},
"Define a schemafull table": {
"prefix": "define table schemafull",
"body": [
"DEFINE TABLE $1 SCHEMAFULL;"
]
},
"Define a schemaless table": {
"prefix": "define table schemaless",
"body": [
"DEFINE TABLE $1 SCHEMALESS;"
]
},
"Define a foreign table": {
"prefix": "define table as",
"body": [
"DEFINE TABLE $1 AS SELECT $2 FROM $3;"
]
},
"Define an event": {
"prefix": "define event",
"body": [
"DEFINE EVENT $1 ON $2 WHEN ($3) THEN {",
"\t$4",
"};"
]
},
"Define a function": {
"prefix": "define function",
"body": [
"DEFINE FUNCTION fn::$1($2) {",
"\t$3",
"};"
]
},
"Define a field": {
"prefix": "define field",
"body": [
"DEFINE FIELD $1 ON $2 TYPE $3;"
]
},
"Define a unique index": {
"prefix": "define index unique",
"body": [
"DEFINE INDEX $1 ON $2 FIELDS $3 UNIQUE;"
]
},
"Define a search index": {
"prefix": "define index search",
"body": [
"DEFINE INDEX $1 ON $2 FIELDS $3 SEARCH ANALYZER BM25 HIGHLIGHTS;"
]
},
"Define a global parameter": {
"prefix": "define param",
"body": [
"DEFINE PARAM \\$$1 VALUE $2;"
]
},
"Remove a namespace": {
"prefix": "remove ns",
"body": [
"REMOVE NAMESPACE $1;"
]
},
"Remove a database": {
"prefix": "remove db",
"body": [
"REMOVE DATABASE $1;"
]
},
"Remove a login": {
"prefix": "remove login",
"body": [
"REMOVE LOGIN $1 ON $2;"
]
},
"Remove a token": {
"prefix": "remove token",
"body": [
"REMOVE TOKEN $1 ON $2;"
]
},
"Remove a scope": {
"prefix": "remove scope",
"body": [
"REMOVE SCOPE $1;"
]
},
"Remove a table": {
"prefix": "remove table",
"body": [
"REMOVE TABLE $1;"
]
},
"Remove an event": {
"prefix": "remove event",
"body": [
"REMOVE EVENT $1 ON $2;"
]
},
"Remove a function": {
"prefix": "remove function",
"body": [
"REMOVE FUNCTION fn::$1;"
]
},
"Remove a field": {
"prefix": "remove field",
"body": [
"DEFINE FIELD $1 ON $2;"
]
},
"Remove an index": {
"prefix": "remove index",
"body": [
"REMOVE INDEX $1 ON $2;"
]
},
"Remove a global parameter": {
"prefix": "remove param",
"body": [
"REMOVE PARAM \\$$1;"
]
},
"Info for KV": {
"prefix": "info kv",
"body": [
"INFO FOR KV;"
]
},
"Info for a namespace": {
"prefix": "info ns",
"body": [
"INFO FOR NS $1;"
]
},
"Info for a database": {
"prefix": "info db",
"body": [
"INFO FOR DB $1;"
]
},
"Info for a scope": {
"prefix": "info scope",
"body": [
"INFO FOR SCOPE $1;"
]
},
"Info for a table": {
"prefix": "info table",
"body": [
"INFO FOR TABLE $1;"
]
},
"Sleep for X amount of time": {
"prefix": "sleep",
"body": [
"SLEEP $1;"
]
}
}