@enjoys/context-engine 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/data/commands/adb.json +322 -0
  2. package/data/commands/alembic.json +301 -0
  3. package/data/commands/artisan.json +277 -0
  4. package/data/commands/atlas.json +426 -0
  5. package/data/commands/auth0.json +648 -0
  6. package/data/commands/bat.json +84 -0
  7. package/data/commands/bundle.json +321 -0
  8. package/data/commands/composer.json +507 -0
  9. package/data/commands/dart.json +216 -0
  10. package/data/commands/dbmate.json +257 -0
  11. package/data/commands/docker-compose.json +384 -0
  12. package/data/commands/drizzle-kit.json +217 -0
  13. package/data/commands/expo.json +65 -0
  14. package/data/commands/fastlane.json +243 -0
  15. package/data/commands/fd.json +86 -0
  16. package/data/commands/flutter.json +298 -0
  17. package/data/commands/flyway.json +261 -0
  18. package/data/commands/fzf.json +103 -0
  19. package/data/commands/gem.json +267 -0
  20. package/data/commands/jq.json +100 -0
  21. package/data/commands/k9s.json +62 -0
  22. package/data/commands/liquibase.json +399 -0
  23. package/data/commands/manifest.json +619 -0
  24. package/data/commands/minikube.json +60 -0
  25. package/data/commands/ng.json +64 -0
  26. package/data/commands/nuxt.json +60 -0
  27. package/data/commands/php.json +157 -0
  28. package/data/commands/pm2.json +259 -0
  29. package/data/commands/pod.json +175 -0
  30. package/data/commands/prisma.json +257 -0
  31. package/data/commands/rails.json +372 -0
  32. package/data/commands/rake.json +360 -0
  33. package/data/commands/react-native.json +57 -0
  34. package/data/commands/rg.json +103 -0
  35. package/data/commands/rspec.json +257 -0
  36. package/data/commands/ruby.json +108 -0
  37. package/data/commands/sequelize.json +342 -0
  38. package/data/commands/snyk.json +442 -0
  39. package/data/commands/sonar-scanner.json +219 -0
  40. package/data/commands/stripe.json +314 -0
  41. package/data/commands/symfony.json +449 -0
  42. package/data/commands/tmux.json +197 -0
  43. package/data/commands/trivy.json +367 -0
  44. package/data/commands/twilio.json +382 -0
  45. package/data/commands/typeorm.json +262 -0
  46. package/data/commands/vue.json +60 -0
  47. package/data/commands/wp.json +857 -0
  48. package/data/commands/xcodebuild.json +141 -0
  49. package/data/commands/yq.json +57 -0
  50. package/data/completion/bash.json +1184 -0
  51. package/data/completion/c.json +1067 -0
  52. package/data/completion/cpp.json +824 -0
  53. package/data/completion/csharp.json +860 -0
  54. package/data/completion/dockerfile.json +536 -0
  55. package/data/completion/go.json +1346 -0
  56. package/data/completion/html.json +806 -0
  57. package/data/completion/java.json +1112 -0
  58. package/data/completion/javascript.json +914 -0
  59. package/data/completion/lua.json +968 -0
  60. package/data/completion/php.json +1535 -0
  61. package/data/completion/python.json +1427 -0
  62. package/data/completion/ruby.json +1531 -0
  63. package/data/completion/rust.json +698 -0
  64. package/data/completion/sql.json +887 -0
  65. package/data/completion/toml.json +428 -0
  66. package/data/completion/typescript.json +338 -0
  67. package/data/completion/yaml.json +563 -0
  68. package/data/defination/bash.json +565 -0
  69. package/data/defination/c.json +865 -0
  70. package/data/defination/cpp.json +348 -0
  71. package/data/defination/csharp.json +144 -0
  72. package/data/defination/dockerfile.json +113 -0
  73. package/data/defination/go.json +561 -0
  74. package/data/defination/html.json +559 -0
  75. package/data/defination/java.json +184 -0
  76. package/data/defination/javascript.json +265 -0
  77. package/data/defination/lua.json +181 -0
  78. package/data/defination/php.json +726 -0
  79. package/data/defination/python.json +717 -0
  80. package/data/defination/ruby.json +670 -0
  81. package/data/defination/rust.json +207 -0
  82. package/data/defination/sql.json +473 -0
  83. package/data/defination/toml.json +251 -0
  84. package/data/defination/typescript.json +29 -0
  85. package/data/defination/yaml.json +197 -0
  86. package/data/hover/bash.json +245 -0
  87. package/data/hover/c.json +265 -0
  88. package/data/hover/cpp.json +210 -0
  89. package/data/hover/csharp.json +290 -0
  90. package/data/hover/dockerfile.json +145 -0
  91. package/data/hover/go.json +580 -0
  92. package/data/hover/html.json +250 -0
  93. package/data/hover/java.json +395 -0
  94. package/data/hover/javascript.json +330 -0
  95. package/data/hover/lua.json +265 -0
  96. package/data/hover/php.json +300 -0
  97. package/data/hover/python.json +380 -0
  98. package/data/hover/ruby.json +265 -0
  99. package/data/hover/rust.json +275 -0
  100. package/data/hover/sql.json +230 -0
  101. package/data/hover/toml.json +145 -0
  102. package/data/hover/typescript.json +120 -0
  103. package/data/hover/yaml.json +165 -0
  104. package/data/manifest.json +242 -0
  105. package/package.json +1 -1
@@ -0,0 +1,887 @@
1
+ {
2
+ "language": "sql",
3
+ "completions": [
4
+ {
5
+ "label": "SELECT",
6
+ "kind": 14,
7
+ "detail": "Select rows from tables",
8
+ "documentation": { "value": "Retrieves rows from one or more tables. Supports filtering, grouping, ordering, and limiting results." },
9
+ "insertText": "SELECT ${1:columns} FROM ${2:table}",
10
+ "insertTextRules": 4,
11
+ "sortText": "00_SELECT"
12
+ },
13
+ {
14
+ "label": "SELECT DISTINCT",
15
+ "kind": 15,
16
+ "detail": "Select unique rows",
17
+ "documentation": { "value": "Retrieves only distinct (unique) rows from a query result, eliminating duplicate records." },
18
+ "insertText": "SELECT DISTINCT ${1:columns} FROM ${2:table}",
19
+ "insertTextRules": 4,
20
+ "sortText": "00_SELECT_DISTINCT"
21
+ },
22
+ {
23
+ "label": "SELECT * FROM",
24
+ "kind": 15,
25
+ "detail": "Select all columns from a table",
26
+ "documentation": { "value": "Retrieves all columns from the specified table." },
27
+ "insertText": "SELECT * FROM ${1:table}",
28
+ "insertTextRules": 4,
29
+ "sortText": "00_SELECT_ALL"
30
+ },
31
+ {
32
+ "label": "INSERT INTO",
33
+ "kind": 14,
34
+ "detail": "Insert rows into a table",
35
+ "documentation": { "value": "Inserts one or more rows into a table with specified column values." },
36
+ "insertText": "INSERT INTO ${1:table} (${2:columns}) VALUES (${3:values})",
37
+ "insertTextRules": 4,
38
+ "sortText": "01_INSERT"
39
+ },
40
+ {
41
+ "label": "INSERT INTO SELECT",
42
+ "kind": 15,
43
+ "detail": "Insert rows from a query",
44
+ "documentation": { "value": "Inserts rows into a table using the result of a SELECT statement." },
45
+ "insertText": "INSERT INTO ${1:target_table} (${2:columns})\nSELECT ${3:columns} FROM ${4:source_table}\nWHERE ${5:condition}",
46
+ "insertTextRules": 4,
47
+ "sortText": "01_INSERT_SELECT"
48
+ },
49
+ {
50
+ "label": "UPDATE",
51
+ "kind": 14,
52
+ "detail": "Update rows in a table",
53
+ "documentation": { "value": "Modifies existing rows in a table that match an optional WHERE condition." },
54
+ "insertText": "UPDATE ${1:table} SET ${2:column} = ${3:value} WHERE ${4:condition}",
55
+ "insertTextRules": 4,
56
+ "sortText": "01_UPDATE"
57
+ },
58
+ {
59
+ "label": "DELETE FROM",
60
+ "kind": 14,
61
+ "detail": "Delete rows from a table",
62
+ "documentation": { "value": "Removes rows from a table that match the specified WHERE condition. Omitting WHERE deletes all rows." },
63
+ "insertText": "DELETE FROM ${1:table} WHERE ${2:condition}",
64
+ "insertTextRules": 4,
65
+ "sortText": "01_DELETE"
66
+ },
67
+ {
68
+ "label": "CREATE TABLE",
69
+ "kind": 15,
70
+ "detail": "Create a new table",
71
+ "documentation": { "value": "Creates a new table with the specified columns, data types, and constraints." },
72
+ "insertText": "CREATE TABLE ${1:table_name} (\n\t${2:id} INT PRIMARY KEY AUTO_INCREMENT,\n\t${3:column_name} ${4:VARCHAR(255)} ${5:NOT NULL},\n\tCREATED_AT TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n)",
73
+ "insertTextRules": 4,
74
+ "sortText": "02_CREATE_TABLE"
75
+ },
76
+ {
77
+ "label": "CREATE TABLE IF NOT EXISTS",
78
+ "kind": 15,
79
+ "detail": "Create table if it doesn't exist",
80
+ "documentation": { "value": "Creates a new table only if a table with the same name does not already exist." },
81
+ "insertText": "CREATE TABLE IF NOT EXISTS ${1:table_name} (\n\t${2:id} INT PRIMARY KEY AUTO_INCREMENT,\n\t${3:column_name} ${4:VARCHAR(255)}\n)",
82
+ "insertTextRules": 4,
83
+ "sortText": "02_CREATE_TABLE_IF"
84
+ },
85
+ {
86
+ "label": "CREATE INDEX",
87
+ "kind": 15,
88
+ "detail": "Create an index on a table",
89
+ "documentation": { "value": "Creates an index on one or more columns to improve query performance." },
90
+ "insertText": "CREATE INDEX ${1:idx_name} ON ${2:table} (${3:column})",
91
+ "insertTextRules": 4,
92
+ "sortText": "02_CREATE_INDEX"
93
+ },
94
+ {
95
+ "label": "CREATE UNIQUE INDEX",
96
+ "kind": 15,
97
+ "detail": "Create a unique index",
98
+ "documentation": { "value": "Creates a unique index ensuring no duplicate values in the indexed columns." },
99
+ "insertText": "CREATE UNIQUE INDEX ${1:idx_name} ON ${2:table} (${3:column})",
100
+ "insertTextRules": 4,
101
+ "sortText": "02_CREATE_UNIQUE_INDEX"
102
+ },
103
+ {
104
+ "label": "CREATE VIEW",
105
+ "kind": 15,
106
+ "detail": "Create a view",
107
+ "documentation": { "value": "Creates a virtual table based on a SELECT query. Views simplify complex queries and provide abstraction." },
108
+ "insertText": "CREATE VIEW ${1:view_name} AS\nSELECT ${2:columns}\nFROM ${3:table}\nWHERE ${4:condition}",
109
+ "insertTextRules": 4,
110
+ "sortText": "02_CREATE_VIEW"
111
+ },
112
+ {
113
+ "label": "CREATE DATABASE",
114
+ "kind": 15,
115
+ "detail": "Create a new database",
116
+ "documentation": { "value": "Creates a new database with the specified name." },
117
+ "insertText": "CREATE DATABASE ${1:database_name}",
118
+ "insertTextRules": 4,
119
+ "sortText": "02_CREATE_DATABASE"
120
+ },
121
+ {
122
+ "label": "ALTER TABLE ADD COLUMN",
123
+ "kind": 15,
124
+ "detail": "Add a column to a table",
125
+ "documentation": { "value": "Adds a new column to an existing table with the specified data type and constraints." },
126
+ "insertText": "ALTER TABLE ${1:table} ADD COLUMN ${2:column_name} ${3:data_type}",
127
+ "insertTextRules": 4,
128
+ "sortText": "03_ALTER_ADD"
129
+ },
130
+ {
131
+ "label": "ALTER TABLE DROP COLUMN",
132
+ "kind": 15,
133
+ "detail": "Remove a column from a table",
134
+ "documentation": { "value": "Removes an existing column from a table. This is a destructive operation." },
135
+ "insertText": "ALTER TABLE ${1:table} DROP COLUMN ${2:column_name}",
136
+ "insertTextRules": 4,
137
+ "sortText": "03_ALTER_DROP"
138
+ },
139
+ {
140
+ "label": "ALTER TABLE MODIFY COLUMN",
141
+ "kind": 15,
142
+ "detail": "Modify a column definition",
143
+ "documentation": { "value": "Changes the data type or constraints of an existing column." },
144
+ "insertText": "ALTER TABLE ${1:table} MODIFY COLUMN ${2:column_name} ${3:new_data_type}",
145
+ "insertTextRules": 4,
146
+ "sortText": "03_ALTER_MODIFY"
147
+ },
148
+ {
149
+ "label": "ALTER TABLE RENAME",
150
+ "kind": 15,
151
+ "detail": "Rename a table",
152
+ "documentation": { "value": "Renames an existing table to a new name." },
153
+ "insertText": "ALTER TABLE ${1:old_name} RENAME TO ${2:new_name}",
154
+ "insertTextRules": 4,
155
+ "sortText": "03_ALTER_RENAME"
156
+ },
157
+ {
158
+ "label": "DROP TABLE",
159
+ "kind": 14,
160
+ "detail": "Drop a table",
161
+ "documentation": { "value": "Permanently removes a table and all its data from the database." },
162
+ "insertText": "DROP TABLE IF EXISTS ${1:table_name}",
163
+ "insertTextRules": 4,
164
+ "sortText": "03_DROP_TABLE"
165
+ },
166
+ {
167
+ "label": "DROP INDEX",
168
+ "kind": 14,
169
+ "detail": "Drop an index",
170
+ "documentation": { "value": "Removes an index from the database." },
171
+ "insertText": "DROP INDEX ${1:index_name} ON ${2:table}",
172
+ "insertTextRules": 4,
173
+ "sortText": "03_DROP_INDEX"
174
+ },
175
+ {
176
+ "label": "DROP DATABASE",
177
+ "kind": 14,
178
+ "detail": "Drop a database",
179
+ "documentation": { "value": "Permanently removes a database and all its tables." },
180
+ "insertText": "DROP DATABASE IF EXISTS ${1:database_name}",
181
+ "insertTextRules": 4,
182
+ "sortText": "03_DROP_DATABASE"
183
+ },
184
+ {
185
+ "label": "WHERE",
186
+ "kind": 14,
187
+ "detail": "Filter rows by condition",
188
+ "documentation": { "value": "Filters rows based on a specified condition. Used with SELECT, UPDATE, and DELETE statements." },
189
+ "insertText": "WHERE ${1:condition}",
190
+ "insertTextRules": 4,
191
+ "sortText": "04_WHERE"
192
+ },
193
+ {
194
+ "label": "INNER JOIN",
195
+ "kind": 14,
196
+ "detail": "Inner join two tables",
197
+ "documentation": { "value": "Returns rows that have matching values in both tables." },
198
+ "insertText": "INNER JOIN ${1:table} ON ${2:condition}",
199
+ "insertTextRules": 4,
200
+ "sortText": "05_INNER_JOIN"
201
+ },
202
+ {
203
+ "label": "LEFT JOIN",
204
+ "kind": 14,
205
+ "detail": "Left outer join",
206
+ "documentation": { "value": "Returns all rows from the left table and matched rows from the right table. Non-matching right rows are NULL." },
207
+ "insertText": "LEFT JOIN ${1:table} ON ${2:condition}",
208
+ "insertTextRules": 4,
209
+ "sortText": "05_LEFT_JOIN"
210
+ },
211
+ {
212
+ "label": "RIGHT JOIN",
213
+ "kind": 14,
214
+ "detail": "Right outer join",
215
+ "documentation": { "value": "Returns all rows from the right table and matched rows from the left table. Non-matching left rows are NULL." },
216
+ "insertText": "RIGHT JOIN ${1:table} ON ${2:condition}",
217
+ "insertTextRules": 4,
218
+ "sortText": "05_RIGHT_JOIN"
219
+ },
220
+ {
221
+ "label": "FULL OUTER JOIN",
222
+ "kind": 14,
223
+ "detail": "Full outer join",
224
+ "documentation": { "value": "Returns all rows from both tables with NULLs where there is no match." },
225
+ "insertText": "FULL OUTER JOIN ${1:table} ON ${2:condition}",
226
+ "insertTextRules": 4,
227
+ "sortText": "05_FULL_JOIN"
228
+ },
229
+ {
230
+ "label": "CROSS JOIN",
231
+ "kind": 14,
232
+ "detail": "Cross join (Cartesian product)",
233
+ "documentation": { "value": "Returns the Cartesian product of both tables — every combination of rows." },
234
+ "insertText": "CROSS JOIN ${1:table}",
235
+ "insertTextRules": 4,
236
+ "sortText": "05_CROSS_JOIN"
237
+ },
238
+ {
239
+ "label": "SELF JOIN",
240
+ "kind": 15,
241
+ "detail": "Join a table with itself",
242
+ "documentation": { "value": "Joins a table to itself using aliases, useful for hierarchical or comparative queries." },
243
+ "insertText": "SELECT a.${1:column}, b.${2:column}\nFROM ${3:table} a\nINNER JOIN ${3:table} b ON a.${4:key} = b.${5:key}",
244
+ "insertTextRules": 4,
245
+ "sortText": "05_SELF_JOIN"
246
+ },
247
+ {
248
+ "label": "GROUP BY",
249
+ "kind": 14,
250
+ "detail": "Group rows by column(s)",
251
+ "documentation": { "value": "Groups rows sharing a value in specified columns into summary rows. Commonly used with aggregate functions." },
252
+ "insertText": "GROUP BY ${1:column}",
253
+ "insertTextRules": 4,
254
+ "sortText": "06_GROUP_BY"
255
+ },
256
+ {
257
+ "label": "HAVING",
258
+ "kind": 14,
259
+ "detail": "Filter grouped rows",
260
+ "documentation": { "value": "Filters groups created by GROUP BY based on aggregate conditions. Similar to WHERE but for groups." },
261
+ "insertText": "HAVING ${1:condition}",
262
+ "insertTextRules": 4,
263
+ "sortText": "06_HAVING"
264
+ },
265
+ {
266
+ "label": "ORDER BY",
267
+ "kind": 14,
268
+ "detail": "Sort result set",
269
+ "documentation": { "value": "Sorts the result set by one or more columns in ascending (ASC) or descending (DESC) order." },
270
+ "insertText": "ORDER BY ${1:column} ${2|ASC,DESC|}",
271
+ "insertTextRules": 4,
272
+ "sortText": "06_ORDER_BY"
273
+ },
274
+ {
275
+ "label": "LIMIT",
276
+ "kind": 14,
277
+ "detail": "Limit number of rows returned",
278
+ "documentation": { "value": "Restricts the number of rows returned by a query." },
279
+ "insertText": "LIMIT ${1:count}",
280
+ "insertTextRules": 4,
281
+ "sortText": "06_LIMIT"
282
+ },
283
+ {
284
+ "label": "OFFSET",
285
+ "kind": 14,
286
+ "detail": "Skip rows before returning",
287
+ "documentation": { "value": "Skips the specified number of rows before returning results. Used with LIMIT for pagination." },
288
+ "insertText": "OFFSET ${1:count}",
289
+ "insertTextRules": 4,
290
+ "sortText": "06_OFFSET"
291
+ },
292
+ {
293
+ "label": "LIMIT OFFSET",
294
+ "kind": 15,
295
+ "detail": "Paginate results",
296
+ "documentation": { "value": "Combines LIMIT and OFFSET for pagination. LIMIT controls page size, OFFSET controls starting position." },
297
+ "insertText": "LIMIT ${1:page_size} OFFSET ${2:start}",
298
+ "insertTextRules": 4,
299
+ "sortText": "06_LIMIT_OFFSET"
300
+ },
301
+ {
302
+ "label": "UNION",
303
+ "kind": 14,
304
+ "detail": "Combine result sets (deduplicated)",
305
+ "documentation": { "value": "Combines the result sets of two or more SELECT statements, removing duplicates." },
306
+ "insertText": "UNION\nSELECT ${1:columns} FROM ${2:table}",
307
+ "insertTextRules": 4,
308
+ "sortText": "07_UNION"
309
+ },
310
+ {
311
+ "label": "UNION ALL",
312
+ "kind": 14,
313
+ "detail": "Combine result sets (with duplicates)",
314
+ "documentation": { "value": "Combines the result sets of two or more SELECT statements, including duplicates. Faster than UNION." },
315
+ "insertText": "UNION ALL\nSELECT ${1:columns} FROM ${2:table}",
316
+ "insertTextRules": 4,
317
+ "sortText": "07_UNION_ALL"
318
+ },
319
+ {
320
+ "label": "EXISTS",
321
+ "kind": 14,
322
+ "detail": "Check for subquery results",
323
+ "documentation": { "value": "Returns TRUE if the subquery returns one or more rows. Often used in WHERE clauses." },
324
+ "insertText": "EXISTS (SELECT 1 FROM ${1:table} WHERE ${2:condition})",
325
+ "insertTextRules": 4,
326
+ "sortText": "07_EXISTS"
327
+ },
328
+ {
329
+ "label": "IN",
330
+ "kind": 14,
331
+ "detail": "Match against a list of values",
332
+ "documentation": { "value": "Tests whether a value matches any value in a list or subquery." },
333
+ "insertText": "IN (${1:values})",
334
+ "insertTextRules": 4,
335
+ "sortText": "07_IN"
336
+ },
337
+ {
338
+ "label": "NOT IN",
339
+ "kind": 14,
340
+ "detail": "Exclude a list of values",
341
+ "documentation": { "value": "Tests whether a value does not match any value in a list or subquery." },
342
+ "insertText": "NOT IN (${1:values})",
343
+ "insertTextRules": 4,
344
+ "sortText": "07_NOT_IN"
345
+ },
346
+ {
347
+ "label": "BETWEEN",
348
+ "kind": 14,
349
+ "detail": "Range filter",
350
+ "documentation": { "value": "Filters values within a specified inclusive range. Works with numbers, dates, and strings." },
351
+ "insertText": "BETWEEN ${1:start} AND ${2:end}",
352
+ "insertTextRules": 4,
353
+ "sortText": "07_BETWEEN"
354
+ },
355
+ {
356
+ "label": "LIKE",
357
+ "kind": 14,
358
+ "detail": "Pattern matching",
359
+ "documentation": { "value": "Filters rows by pattern matching. Use '%' for any sequence of characters and '_' for a single character." },
360
+ "insertText": "LIKE '${1:pattern}'",
361
+ "insertTextRules": 4,
362
+ "sortText": "07_LIKE"
363
+ },
364
+ {
365
+ "label": "CASE WHEN",
366
+ "kind": 15,
367
+ "detail": "Conditional expression",
368
+ "documentation": { "value": "Evaluates conditions and returns a value when the first condition is met, similar to IF-THEN-ELSE." },
369
+ "insertText": "CASE\n\tWHEN ${1:condition} THEN ${2:result}\n\tWHEN ${3:condition} THEN ${4:result}\n\tELSE ${5:default}\nEND",
370
+ "insertTextRules": 4,
371
+ "sortText": "07_CASE"
372
+ },
373
+ {
374
+ "label": "AS",
375
+ "kind": 14,
376
+ "detail": "Alias for column or table",
377
+ "documentation": { "value": "Creates an alias for a column or table, making the output more readable." },
378
+ "insertText": "AS ${1:alias}",
379
+ "insertTextRules": 4,
380
+ "sortText": "08_AS"
381
+ },
382
+ {
383
+ "label": "WITH (CTE)",
384
+ "kind": 15,
385
+ "detail": "Common Table Expression",
386
+ "documentation": { "value": "Defines a temporary named result set (CTE) that can be referenced within the main query. Improves readability for complex queries." },
387
+ "insertText": "WITH ${1:cte_name} AS (\n\tSELECT ${2:columns}\n\tFROM ${3:table}\n\tWHERE ${4:condition}\n)\nSELECT * FROM ${1:cte_name}",
388
+ "insertTextRules": 4,
389
+ "sortText": "00_WITH_CTE"
390
+ },
391
+ {
392
+ "label": "WITH RECURSIVE (CTE)",
393
+ "kind": 15,
394
+ "detail": "Recursive Common Table Expression",
395
+ "documentation": { "value": "Defines a recursive CTE for querying hierarchical or tree-structured data." },
396
+ "insertText": "WITH RECURSIVE ${1:cte_name} AS (\n\tSELECT ${2:columns}\n\tFROM ${3:table}\n\tWHERE ${4:base_condition}\n\tUNION ALL\n\tSELECT ${5:columns}\n\tFROM ${3:table}\n\tINNER JOIN ${1:cte_name} ON ${6:join_condition}\n)\nSELECT * FROM ${1:cte_name}",
397
+ "insertTextRules": 4,
398
+ "sortText": "00_WITH_RECURSIVE"
399
+ },
400
+ {
401
+ "label": "DISTINCT",
402
+ "kind": 14,
403
+ "detail": "Remove duplicate rows",
404
+ "documentation": { "value": "Eliminates duplicate rows from the result set." },
405
+ "insertText": "DISTINCT",
406
+ "insertTextRules": 0,
407
+ "sortText": "08_DISTINCT"
408
+ },
409
+ {
410
+ "label": "IS NULL",
411
+ "kind": 14,
412
+ "detail": "Check for NULL values",
413
+ "documentation": { "value": "Tests whether a value is NULL." },
414
+ "insertText": "IS NULL",
415
+ "insertTextRules": 0,
416
+ "sortText": "08_IS_NULL"
417
+ },
418
+ {
419
+ "label": "IS NOT NULL",
420
+ "kind": 14,
421
+ "detail": "Check for non-NULL values",
422
+ "documentation": { "value": "Tests whether a value is not NULL." },
423
+ "insertText": "IS NOT NULL",
424
+ "insertTextRules": 0,
425
+ "sortText": "08_IS_NOT_NULL"
426
+ },
427
+ {
428
+ "label": "COUNT",
429
+ "kind": 1,
430
+ "detail": "Count rows",
431
+ "documentation": { "value": "Returns the number of rows matching the query. COUNT(*) counts all rows; COUNT(column) counts non-NULL values." },
432
+ "insertText": "COUNT(${1:*})",
433
+ "insertTextRules": 4,
434
+ "sortText": "10_COUNT"
435
+ },
436
+ {
437
+ "label": "SUM",
438
+ "kind": 1,
439
+ "detail": "Sum of values",
440
+ "documentation": { "value": "Returns the total sum of a numeric column." },
441
+ "insertText": "SUM(${1:column})",
442
+ "insertTextRules": 4,
443
+ "sortText": "10_SUM"
444
+ },
445
+ {
446
+ "label": "AVG",
447
+ "kind": 1,
448
+ "detail": "Average of values",
449
+ "documentation": { "value": "Returns the average value of a numeric column, ignoring NULLs." },
450
+ "insertText": "AVG(${1:column})",
451
+ "insertTextRules": 4,
452
+ "sortText": "10_AVG"
453
+ },
454
+ {
455
+ "label": "MIN",
456
+ "kind": 1,
457
+ "detail": "Minimum value",
458
+ "documentation": { "value": "Returns the smallest value in a column." },
459
+ "insertText": "MIN(${1:column})",
460
+ "insertTextRules": 4,
461
+ "sortText": "10_MIN"
462
+ },
463
+ {
464
+ "label": "MAX",
465
+ "kind": 1,
466
+ "detail": "Maximum value",
467
+ "documentation": { "value": "Returns the largest value in a column." },
468
+ "insertText": "MAX(${1:column})",
469
+ "insertTextRules": 4,
470
+ "sortText": "10_MAX"
471
+ },
472
+ {
473
+ "label": "GROUP_CONCAT",
474
+ "kind": 1,
475
+ "detail": "Concatenate grouped values",
476
+ "documentation": { "value": "Concatenates values from multiple rows into a single string, with an optional separator. MySQL-specific; use STRING_AGG in PostgreSQL." },
477
+ "insertText": "GROUP_CONCAT(${1:column} SEPARATOR '${2:,}')",
478
+ "insertTextRules": 4,
479
+ "sortText": "10_GROUP_CONCAT"
480
+ },
481
+ {
482
+ "label": "CONCAT",
483
+ "kind": 1,
484
+ "detail": "Concatenate strings",
485
+ "documentation": { "value": "Concatenates two or more strings into one." },
486
+ "insertText": "CONCAT(${1:string1}, ${2:string2})",
487
+ "insertTextRules": 4,
488
+ "sortText": "11_CONCAT"
489
+ },
490
+ {
491
+ "label": "SUBSTRING",
492
+ "kind": 1,
493
+ "detail": "Extract part of a string",
494
+ "documentation": { "value": "Returns a portion of a string starting at a specified position for a given length." },
495
+ "insertText": "SUBSTRING(${1:string}, ${2:start}, ${3:length})",
496
+ "insertTextRules": 4,
497
+ "sortText": "11_SUBSTRING"
498
+ },
499
+ {
500
+ "label": "TRIM",
501
+ "kind": 1,
502
+ "detail": "Remove leading/trailing spaces",
503
+ "documentation": { "value": "Removes leading and trailing whitespace (or specified characters) from a string." },
504
+ "insertText": "TRIM(${1:string})",
505
+ "insertTextRules": 4,
506
+ "sortText": "11_TRIM"
507
+ },
508
+ {
509
+ "label": "UPPER",
510
+ "kind": 1,
511
+ "detail": "Convert to uppercase",
512
+ "documentation": { "value": "Converts all characters in a string to uppercase." },
513
+ "insertText": "UPPER(${1:string})",
514
+ "insertTextRules": 4,
515
+ "sortText": "11_UPPER"
516
+ },
517
+ {
518
+ "label": "LOWER",
519
+ "kind": 1,
520
+ "detail": "Convert to lowercase",
521
+ "documentation": { "value": "Converts all characters in a string to lowercase." },
522
+ "insertText": "LOWER(${1:string})",
523
+ "insertTextRules": 4,
524
+ "sortText": "11_LOWER"
525
+ },
526
+ {
527
+ "label": "LENGTH",
528
+ "kind": 1,
529
+ "detail": "String length",
530
+ "documentation": { "value": "Returns the number of characters in a string." },
531
+ "insertText": "LENGTH(${1:string})",
532
+ "insertTextRules": 4,
533
+ "sortText": "11_LENGTH"
534
+ },
535
+ {
536
+ "label": "REPLACE",
537
+ "kind": 1,
538
+ "detail": "Replace occurrences in a string",
539
+ "documentation": { "value": "Replaces all occurrences of a substring within a string with a new substring." },
540
+ "insertText": "REPLACE(${1:string}, ${2:old}, ${3:new})",
541
+ "insertTextRules": 4,
542
+ "sortText": "11_REPLACE"
543
+ },
544
+ {
545
+ "label": "COALESCE",
546
+ "kind": 1,
547
+ "detail": "Return first non-NULL value",
548
+ "documentation": { "value": "Returns the first non-NULL value from the argument list. Useful for providing default values." },
549
+ "insertText": "COALESCE(${1:value1}, ${2:value2})",
550
+ "insertTextRules": 4,
551
+ "sortText": "11_COALESCE"
552
+ },
553
+ {
554
+ "label": "IFNULL",
555
+ "kind": 1,
556
+ "detail": "Replace NULL with a value",
557
+ "documentation": { "value": "Returns the first argument if it is not NULL; otherwise returns the second argument. MySQL-specific." },
558
+ "insertText": "IFNULL(${1:expression}, ${2:default_value})",
559
+ "insertTextRules": 4,
560
+ "sortText": "11_IFNULL"
561
+ },
562
+ {
563
+ "label": "CAST",
564
+ "kind": 1,
565
+ "detail": "Convert data type",
566
+ "documentation": { "value": "Converts a value from one data type to another." },
567
+ "insertText": "CAST(${1:expression} AS ${2:data_type})",
568
+ "insertTextRules": 4,
569
+ "sortText": "11_CAST"
570
+ },
571
+ {
572
+ "label": "NOW",
573
+ "kind": 1,
574
+ "detail": "Current date and time",
575
+ "documentation": { "value": "Returns the current date and time as a DATETIME value." },
576
+ "insertText": "NOW()",
577
+ "insertTextRules": 0,
578
+ "sortText": "12_NOW"
579
+ },
580
+ {
581
+ "label": "CURRENT_TIMESTAMP",
582
+ "kind": 14,
583
+ "detail": "Current timestamp",
584
+ "documentation": { "value": "Returns the current date and time. Equivalent to NOW() in most databases." },
585
+ "insertText": "CURRENT_TIMESTAMP",
586
+ "insertTextRules": 0,
587
+ "sortText": "12_CURRENT_TIMESTAMP"
588
+ },
589
+ {
590
+ "label": "DATE_ADD",
591
+ "kind": 1,
592
+ "detail": "Add interval to a date",
593
+ "documentation": { "value": "Adds a specified time interval to a date." },
594
+ "insertText": "DATE_ADD(${1:date}, INTERVAL ${2:value} ${3|DAY,MONTH,YEAR,HOUR,MINUTE,SECOND|})",
595
+ "insertTextRules": 4,
596
+ "sortText": "12_DATE_ADD"
597
+ },
598
+ {
599
+ "label": "DATEDIFF",
600
+ "kind": 1,
601
+ "detail": "Difference between dates",
602
+ "documentation": { "value": "Returns the number of days between two dates." },
603
+ "insertText": "DATEDIFF(${1:date1}, ${2:date2})",
604
+ "insertTextRules": 4,
605
+ "sortText": "12_DATEDIFF"
606
+ },
607
+ {
608
+ "label": "EXTRACT",
609
+ "kind": 1,
610
+ "detail": "Extract part of a date",
611
+ "documentation": { "value": "Extracts a specific part (YEAR, MONTH, DAY, HOUR, etc.) from a date or timestamp." },
612
+ "insertText": "EXTRACT(${1|YEAR,MONTH,DAY,HOUR,MINUTE,SECOND|} FROM ${2:date})",
613
+ "insertTextRules": 4,
614
+ "sortText": "12_EXTRACT"
615
+ },
616
+ {
617
+ "label": "DATE_FORMAT",
618
+ "kind": 1,
619
+ "detail": "Format a date value",
620
+ "documentation": { "value": "Formats a date value according to the specified format string. MySQL-specific." },
621
+ "insertText": "DATE_FORMAT(${1:date}, '${2:%Y-%m-%d}')",
622
+ "insertTextRules": 4,
623
+ "sortText": "12_DATE_FORMAT"
624
+ },
625
+ {
626
+ "label": "ROW_NUMBER",
627
+ "kind": 1,
628
+ "detail": "Assign sequential row numbers",
629
+ "documentation": { "value": "Assigns a unique sequential integer to each row within a partition, starting at 1." },
630
+ "insertText": "ROW_NUMBER() OVER (${1:PARTITION BY ${2:column}} ORDER BY ${3:column})",
631
+ "insertTextRules": 4,
632
+ "sortText": "13_ROW_NUMBER"
633
+ },
634
+ {
635
+ "label": "RANK",
636
+ "kind": 1,
637
+ "detail": "Assign rank with gaps",
638
+ "documentation": { "value": "Assigns a rank to each row within a partition. Rows with equal values receive the same rank, leaving gaps." },
639
+ "insertText": "RANK() OVER (${1:PARTITION BY ${2:column}} ORDER BY ${3:column})",
640
+ "insertTextRules": 4,
641
+ "sortText": "13_RANK"
642
+ },
643
+ {
644
+ "label": "DENSE_RANK",
645
+ "kind": 1,
646
+ "detail": "Assign rank without gaps",
647
+ "documentation": { "value": "Assigns a rank to each row within a partition. Equal values receive the same rank with no gaps in ranking." },
648
+ "insertText": "DENSE_RANK() OVER (${1:PARTITION BY ${2:column}} ORDER BY ${3:column})",
649
+ "insertTextRules": 4,
650
+ "sortText": "13_DENSE_RANK"
651
+ },
652
+ {
653
+ "label": "LEAD",
654
+ "kind": 1,
655
+ "detail": "Access next row's value",
656
+ "documentation": { "value": "Returns the value of a column from the next row (or N rows ahead) within a partition." },
657
+ "insertText": "LEAD(${1:column}, ${2:offset}, ${3:default}) OVER (${4:PARTITION BY ${5:column}} ORDER BY ${6:column})",
658
+ "insertTextRules": 4,
659
+ "sortText": "13_LEAD"
660
+ },
661
+ {
662
+ "label": "LAG",
663
+ "kind": 1,
664
+ "detail": "Access previous row's value",
665
+ "documentation": { "value": "Returns the value of a column from the previous row (or N rows behind) within a partition." },
666
+ "insertText": "LAG(${1:column}, ${2:offset}, ${3:default}) OVER (${4:PARTITION BY ${5:column}} ORDER BY ${6:column})",
667
+ "insertTextRules": 4,
668
+ "sortText": "13_LAG"
669
+ },
670
+ {
671
+ "label": "NTILE",
672
+ "kind": 1,
673
+ "detail": "Divide rows into buckets",
674
+ "documentation": { "value": "Distributes rows into a specified number of approximately equal groups." },
675
+ "insertText": "NTILE(${1:num_buckets}) OVER (ORDER BY ${2:column})",
676
+ "insertTextRules": 4,
677
+ "sortText": "13_NTILE"
678
+ },
679
+ {
680
+ "label": "OVER",
681
+ "kind": 14,
682
+ "detail": "Window function clause",
683
+ "documentation": { "value": "Defines the window (set of rows) for a window function. Can include PARTITION BY and ORDER BY." },
684
+ "insertText": "OVER (${1:PARTITION BY ${2:column}} ORDER BY ${3:column})",
685
+ "insertTextRules": 4,
686
+ "sortText": "13_OVER"
687
+ },
688
+ {
689
+ "label": "PARTITION BY",
690
+ "kind": 14,
691
+ "detail": "Partition window rows",
692
+ "documentation": { "value": "Divides the result set into partitions for window function calculations." },
693
+ "insertText": "PARTITION BY ${1:column}",
694
+ "insertTextRules": 4,
695
+ "sortText": "13_PARTITION_BY"
696
+ },
697
+ {
698
+ "label": "PRIMARY KEY",
699
+ "kind": 15,
700
+ "detail": "Primary key constraint",
701
+ "documentation": { "value": "Defines a column as the primary key, ensuring uniqueness and creating a clustered index." },
702
+ "insertText": "PRIMARY KEY (${1:column})",
703
+ "insertTextRules": 4,
704
+ "sortText": "14_PRIMARY_KEY"
705
+ },
706
+ {
707
+ "label": "FOREIGN KEY",
708
+ "kind": 15,
709
+ "detail": "Foreign key constraint",
710
+ "documentation": { "value": "Defines a foreign key relationship between two tables, enforcing referential integrity." },
711
+ "insertText": "FOREIGN KEY (${1:column}) REFERENCES ${2:parent_table}(${3:parent_column})",
712
+ "insertTextRules": 4,
713
+ "sortText": "14_FOREIGN_KEY"
714
+ },
715
+ {
716
+ "label": "CONSTRAINT FOREIGN KEY",
717
+ "kind": 15,
718
+ "detail": "Named foreign key constraint",
719
+ "documentation": { "value": "Defines a named foreign key constraint with optional ON DELETE and ON UPDATE actions." },
720
+ "insertText": "CONSTRAINT ${1:fk_name} FOREIGN KEY (${2:column})\n\tREFERENCES ${3:parent_table}(${4:parent_column})\n\tON DELETE ${5|CASCADE,SET NULL,RESTRICT,NO ACTION|}\n\tON UPDATE ${6|CASCADE,SET NULL,RESTRICT,NO ACTION|}",
721
+ "insertTextRules": 4,
722
+ "sortText": "14_CONSTRAINT_FK"
723
+ },
724
+ {
725
+ "label": "UNIQUE",
726
+ "kind": 14,
727
+ "detail": "Unique constraint",
728
+ "documentation": { "value": "Ensures all values in a column or set of columns are unique." },
729
+ "insertText": "UNIQUE (${1:column})",
730
+ "insertTextRules": 4,
731
+ "sortText": "14_UNIQUE"
732
+ },
733
+ {
734
+ "label": "NOT NULL",
735
+ "kind": 14,
736
+ "detail": "Not null constraint",
737
+ "documentation": { "value": "Ensures a column cannot contain NULL values." },
738
+ "insertText": "NOT NULL",
739
+ "insertTextRules": 0,
740
+ "sortText": "14_NOT_NULL"
741
+ },
742
+ {
743
+ "label": "DEFAULT",
744
+ "kind": 14,
745
+ "detail": "Default value",
746
+ "documentation": { "value": "Sets a default value for a column when no value is specified during INSERT." },
747
+ "insertText": "DEFAULT ${1:value}",
748
+ "insertTextRules": 4,
749
+ "sortText": "14_DEFAULT"
750
+ },
751
+ {
752
+ "label": "CHECK",
753
+ "kind": 14,
754
+ "detail": "Check constraint",
755
+ "documentation": { "value": "Defines a condition that each row must satisfy." },
756
+ "insertText": "CHECK (${1:condition})",
757
+ "insertTextRules": 4,
758
+ "sortText": "14_CHECK"
759
+ },
760
+ {
761
+ "label": "BEGIN TRANSACTION",
762
+ "kind": 15,
763
+ "detail": "Start a transaction",
764
+ "documentation": { "value": "Starts a new database transaction. Changes are not committed until COMMIT is called." },
765
+ "insertText": "BEGIN TRANSACTION;\n${1:-- statements}\nCOMMIT;",
766
+ "insertTextRules": 4,
767
+ "sortText": "15_BEGIN"
768
+ },
769
+ {
770
+ "label": "COMMIT",
771
+ "kind": 14,
772
+ "detail": "Commit a transaction",
773
+ "documentation": { "value": "Saves all changes made during the current transaction to the database." },
774
+ "insertText": "COMMIT",
775
+ "insertTextRules": 0,
776
+ "sortText": "15_COMMIT"
777
+ },
778
+ {
779
+ "label": "ROLLBACK",
780
+ "kind": 14,
781
+ "detail": "Rollback a transaction",
782
+ "documentation": { "value": "Undoes all changes made during the current transaction." },
783
+ "insertText": "ROLLBACK",
784
+ "insertTextRules": 0,
785
+ "sortText": "15_ROLLBACK"
786
+ },
787
+ {
788
+ "label": "SAVEPOINT",
789
+ "kind": 14,
790
+ "detail": "Create a savepoint",
791
+ "documentation": { "value": "Creates a point within a transaction to which you can later roll back." },
792
+ "insertText": "SAVEPOINT ${1:savepoint_name}",
793
+ "insertTextRules": 4,
794
+ "sortText": "15_SAVEPOINT"
795
+ },
796
+ {
797
+ "label": "TRUNCATE TABLE",
798
+ "kind": 14,
799
+ "detail": "Remove all rows from a table",
800
+ "documentation": { "value": "Removes all rows from a table quickly without logging individual row deletions. Cannot be rolled back in some databases." },
801
+ "insertText": "TRUNCATE TABLE ${1:table_name}",
802
+ "insertTextRules": 4,
803
+ "sortText": "03_TRUNCATE"
804
+ },
805
+ {
806
+ "label": "EXPLAIN",
807
+ "kind": 14,
808
+ "detail": "Show query execution plan",
809
+ "documentation": { "value": "Displays the execution plan for a query, useful for performance optimization." },
810
+ "insertText": "EXPLAIN ${1:query}",
811
+ "insertTextRules": 4,
812
+ "sortText": "16_EXPLAIN"
813
+ },
814
+ {
815
+ "label": "GRANT",
816
+ "kind": 14,
817
+ "detail": "Grant privileges",
818
+ "documentation": { "value": "Grants specific privileges on database objects to users or roles." },
819
+ "insertText": "GRANT ${1|SELECT,INSERT,UPDATE,DELETE,ALL PRIVILEGES|} ON ${2:table} TO '${3:user}'@'${4:host}'",
820
+ "insertTextRules": 4,
821
+ "sortText": "16_GRANT"
822
+ },
823
+ {
824
+ "label": "REVOKE",
825
+ "kind": 14,
826
+ "detail": "Revoke privileges",
827
+ "documentation": { "value": "Removes previously granted privileges from a user or role." },
828
+ "insertText": "REVOKE ${1|SELECT,INSERT,UPDATE,DELETE,ALL PRIVILEGES|} ON ${2:table} FROM '${3:user}'@'${4:host}'",
829
+ "insertTextRules": 4,
830
+ "sortText": "16_REVOKE"
831
+ },
832
+ {
833
+ "label": "SUBQUERY",
834
+ "kind": 27,
835
+ "detail": "Inline subquery",
836
+ "documentation": { "value": "A SELECT statement nested inside another statement. Can be used in WHERE, FROM, or SELECT clauses." },
837
+ "insertText": "(SELECT ${1:column} FROM ${2:table} WHERE ${3:condition})",
838
+ "insertTextRules": 4,
839
+ "sortText": "17_SUBQUERY"
840
+ },
841
+ {
842
+ "label": "CORRELATED SUBQUERY",
843
+ "kind": 27,
844
+ "detail": "Correlated subquery",
845
+ "documentation": { "value": "A subquery that references columns from the outer query. Evaluated once per row of the outer query." },
846
+ "insertText": "SELECT ${1:columns}\nFROM ${2:table} t1\nWHERE ${3:column} ${4:operator} (\n\tSELECT ${5:aggregate}(${6:column})\n\tFROM ${2:table} t2\n\tWHERE t2.${7:key} = t1.${7:key}\n)",
847
+ "insertTextRules": 4,
848
+ "sortText": "17_CORRELATED_SUBQUERY"
849
+ },
850
+ {
851
+ "label": "INDEX",
852
+ "kind": 14,
853
+ "detail": "Index keyword",
854
+ "documentation": { "value": "Used with CREATE or DROP to manage indexes which speed up data retrieval." },
855
+ "insertText": "INDEX ${1:index_name} (${2:column})",
856
+ "insertTextRules": 4,
857
+ "sortText": "14_INDEX"
858
+ },
859
+ {
860
+ "label": "CREATE PROCEDURE",
861
+ "kind": 15,
862
+ "detail": "Create a stored procedure",
863
+ "documentation": { "value": "Creates a stored procedure that can be called to execute a predefined set of SQL statements." },
864
+ "insertText": "CREATE PROCEDURE ${1:procedure_name}(${2:parameters})\nBEGIN\n\t${3:-- SQL statements}\nEND",
865
+ "insertTextRules": 4,
866
+ "sortText": "02_CREATE_PROCEDURE"
867
+ },
868
+ {
869
+ "label": "CREATE TRIGGER",
870
+ "kind": 15,
871
+ "detail": "Create a trigger",
872
+ "documentation": { "value": "Creates a trigger that automatically executes a set of SQL statements when a specified event occurs on a table." },
873
+ "insertText": "CREATE TRIGGER ${1:trigger_name}\n${2|BEFORE,AFTER|} ${3|INSERT,UPDATE,DELETE|} ON ${4:table}\nFOR EACH ROW\nBEGIN\n\t${5:-- SQL statements}\nEND",
874
+ "insertTextRules": 4,
875
+ "sortText": "02_CREATE_TRIGGER"
876
+ },
877
+ {
878
+ "label": "WINDOW FUNCTION",
879
+ "kind": 27,
880
+ "detail": "Window function with OVER clause",
881
+ "documentation": { "value": "Template for using aggregate or ranking functions as window functions with PARTITION BY and ORDER BY." },
882
+ "insertText": "${1|ROW_NUMBER,RANK,DENSE_RANK,SUM,AVG,COUNT,MIN,MAX|}() OVER (\n\tPARTITION BY ${2:partition_column}\n\tORDER BY ${3:order_column}\n)",
883
+ "insertTextRules": 4,
884
+ "sortText": "13_WINDOW_FUNCTION"
885
+ }
886
+ ]
887
+ }