@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,473 @@
1
+ {
2
+ "language": "sql",
3
+ "definitions": {
4
+ "SELECT": {
5
+ "signature": "SELECT [DISTINCT] column1, column2, ... FROM table [WHERE ...] [GROUP BY ...] [HAVING ...] [ORDER BY ...] [LIMIT n]",
6
+ "description": "Retrieves rows and columns from one or more tables. The most commonly used SQL statement for querying data. Supports filtering, grouping, sorting, and limiting results.",
7
+ "type": "keyword",
8
+ "module": "DML"
9
+ },
10
+ "INSERT": {
11
+ "signature": "INSERT INTO table (column1, column2, ...) VALUES (value1, value2, ...)",
12
+ "description": "Inserts one or more new rows into a table. Can insert explicit values, results from a SELECT query, or use DEFAULT values.",
13
+ "type": "keyword",
14
+ "module": "DML"
15
+ },
16
+ "UPDATE": {
17
+ "signature": "UPDATE table SET column1 = value1, column2 = value2, ... [WHERE condition]",
18
+ "description": "Modifies existing rows in a table. Without a WHERE clause, all rows in the table are updated. Supports joins in some databases.",
19
+ "type": "keyword",
20
+ "module": "DML"
21
+ },
22
+ "DELETE": {
23
+ "signature": "DELETE FROM table [WHERE condition]",
24
+ "description": "Removes rows from a table that match the WHERE condition. Without WHERE, all rows are deleted. Unlike TRUNCATE, DELETE is logged and can be rolled back.",
25
+ "type": "keyword",
26
+ "module": "DML"
27
+ },
28
+ "CREATE TABLE": {
29
+ "signature": "CREATE TABLE [IF NOT EXISTS] table_name (column_name data_type [constraints], ...)",
30
+ "description": "Creates a new table with the specified columns, data types, and optional constraints such as PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, and DEFAULT.",
31
+ "type": "keyword",
32
+ "module": "DDL"
33
+ },
34
+ "ALTER TABLE": {
35
+ "signature": "ALTER TABLE table_name ADD|DROP|MODIFY|RENAME COLUMN ...",
36
+ "description": "Modifies the structure of an existing table. Can add, remove, or modify columns and constraints, or rename the table.",
37
+ "type": "keyword",
38
+ "module": "DDL"
39
+ },
40
+ "DROP TABLE": {
41
+ "signature": "DROP TABLE [IF EXISTS] table_name [CASCADE]",
42
+ "description": "Permanently removes a table and all its data from the database. Use IF EXISTS to avoid errors when the table doesn't exist. CASCADE drops dependent objects.",
43
+ "type": "keyword",
44
+ "module": "DDL"
45
+ },
46
+ "CREATE INDEX": {
47
+ "signature": "CREATE [UNIQUE] INDEX index_name ON table (column1 [ASC|DESC], ...)",
48
+ "description": "Creates an index on one or more table columns to speed up data retrieval. UNIQUE indexes also enforce uniqueness constraints.",
49
+ "type": "keyword",
50
+ "module": "DDL"
51
+ },
52
+ "CREATE VIEW": {
53
+ "signature": "CREATE [OR REPLACE] VIEW view_name AS SELECT ...",
54
+ "description": "Creates a virtual table based on a SELECT statement. Views simplify complex queries, provide abstraction, and can be used for security by limiting column access.",
55
+ "type": "keyword",
56
+ "module": "DDL"
57
+ },
58
+ "TRUNCATE": {
59
+ "signature": "TRUNCATE TABLE table_name",
60
+ "description": "Removes all rows from a table efficiently. Faster than DELETE as it doesn't log individual row deletions. Resets auto-increment counters in most databases.",
61
+ "type": "keyword",
62
+ "module": "DDL"
63
+ },
64
+ "WHERE": {
65
+ "signature": "WHERE condition [AND|OR condition ...]",
66
+ "description": "Filters rows based on specified conditions. Used with SELECT, UPDATE, and DELETE. Supports comparison operators, logical operators, BETWEEN, IN, LIKE, IS NULL, and subqueries.",
67
+ "type": "keyword",
68
+ "module": "DML"
69
+ },
70
+ "INNER JOIN": {
71
+ "signature": "table1 INNER JOIN table2 ON table1.column = table2.column",
72
+ "description": "Returns only rows where there is a match in both tables. The most common type of join. Equivalent to just writing JOIN.",
73
+ "type": "keyword",
74
+ "module": "DML"
75
+ },
76
+ "LEFT JOIN": {
77
+ "signature": "table1 LEFT [OUTER] JOIN table2 ON table1.column = table2.column",
78
+ "description": "Returns all rows from the left table and matching rows from the right table. If no match exists, NULL values are returned for right table columns.",
79
+ "type": "keyword",
80
+ "module": "DML"
81
+ },
82
+ "RIGHT JOIN": {
83
+ "signature": "table1 RIGHT [OUTER] JOIN table2 ON table1.column = table2.column",
84
+ "description": "Returns all rows from the right table and matching rows from the left table. If no match exists, NULL values are returned for left table columns.",
85
+ "type": "keyword",
86
+ "module": "DML"
87
+ },
88
+ "FULL OUTER JOIN": {
89
+ "signature": "table1 FULL OUTER JOIN table2 ON table1.column = table2.column",
90
+ "description": "Returns all rows from both tables, with NULLs where there is no match. Combines the results of LEFT JOIN and RIGHT JOIN.",
91
+ "type": "keyword",
92
+ "module": "DML"
93
+ },
94
+ "CROSS JOIN": {
95
+ "signature": "table1 CROSS JOIN table2",
96
+ "description": "Produces a Cartesian product — every row from the first table is combined with every row from the second table. No ON clause is used.",
97
+ "type": "keyword",
98
+ "module": "DML"
99
+ },
100
+ "GROUP BY": {
101
+ "signature": "GROUP BY column1, column2, ...",
102
+ "description": "Groups rows that share values in specified columns into summary rows. Typically used with aggregate functions (COUNT, SUM, AVG, MIN, MAX).",
103
+ "type": "keyword",
104
+ "module": "DML"
105
+ },
106
+ "HAVING": {
107
+ "signature": "HAVING aggregate_condition",
108
+ "description": "Filters groups created by GROUP BY based on aggregate conditions. Similar to WHERE but operates on grouped results rather than individual rows.",
109
+ "type": "keyword",
110
+ "module": "DML"
111
+ },
112
+ "ORDER BY": {
113
+ "signature": "ORDER BY column1 [ASC|DESC], column2 [ASC|DESC], ...",
114
+ "description": "Sorts the result set by one or more columns. ASC (ascending) is the default. DESC sorts in descending order. NULLS FIRST/LAST controls NULL positioning.",
115
+ "type": "keyword",
116
+ "module": "DML"
117
+ },
118
+ "UNION": {
119
+ "signature": "SELECT ... UNION [ALL] SELECT ...",
120
+ "description": "Combines result sets from multiple SELECT statements. UNION removes duplicates; UNION ALL keeps them. All SELECTs must have the same number of columns with compatible types.",
121
+ "type": "keyword",
122
+ "module": "DML"
123
+ },
124
+ "WITH": {
125
+ "signature": "WITH cte_name AS (SELECT ...) SELECT ... FROM cte_name",
126
+ "description": "Defines a Common Table Expression (CTE) — a temporary named result set. Improves readability for complex queries. Supports recursion with WITH RECURSIVE.",
127
+ "type": "keyword",
128
+ "module": "DML"
129
+ },
130
+ "CASE": {
131
+ "signature": "CASE WHEN condition THEN result [WHEN ...] [ELSE default] END",
132
+ "description": "Conditional expression that returns a value based on the first matching WHEN condition. Similar to IF-THEN-ELSE logic in procedural languages.",
133
+ "type": "keyword",
134
+ "module": "DML"
135
+ },
136
+ "EXISTS": {
137
+ "signature": "EXISTS (subquery)",
138
+ "description": "Returns TRUE if the subquery returns one or more rows. Commonly used in WHERE clauses for correlated subqueries. More efficient than IN for large datasets.",
139
+ "type": "keyword",
140
+ "module": "DML"
141
+ },
142
+ "IN": {
143
+ "signature": "expression IN (value1, value2, ...) | expression IN (subquery)",
144
+ "description": "Tests whether a value matches any value in a list or subquery result set. Equivalent to multiple OR conditions.",
145
+ "type": "keyword",
146
+ "module": "DML"
147
+ },
148
+ "BETWEEN": {
149
+ "signature": "expression BETWEEN low AND high",
150
+ "description": "Filters values within an inclusive range. Equivalent to (expression >= low AND expression <= high). Works with numbers, dates, and strings.",
151
+ "type": "keyword",
152
+ "module": "DML"
153
+ },
154
+ "LIKE": {
155
+ "signature": "expression LIKE pattern [ESCAPE escape_char]",
156
+ "description": "Pattern matching operator. '%' matches any sequence of characters, '_' matches a single character. Use ESCAPE for literal '%' or '_'.",
157
+ "type": "keyword",
158
+ "module": "DML"
159
+ },
160
+ "LIMIT": {
161
+ "signature": "LIMIT count [OFFSET start]",
162
+ "description": "Restricts the number of rows returned. OFFSET specifies how many rows to skip. Used for pagination. Not part of the SQL standard (use FETCH FIRST in standard SQL).",
163
+ "type": "keyword",
164
+ "module": "DML"
165
+ },
166
+ "DISTINCT": {
167
+ "signature": "SELECT DISTINCT column1, column2, ...",
168
+ "description": "Eliminates duplicate rows from the result set based on the selected columns. Can also be used inside aggregate functions like COUNT(DISTINCT column).",
169
+ "type": "keyword",
170
+ "module": "DML"
171
+ },
172
+ "AS": {
173
+ "signature": "expression AS alias_name",
174
+ "description": "Creates an alias for a column, expression, or table. The alias exists only for the duration of the query. Improves readability.",
175
+ "type": "keyword",
176
+ "module": "DML"
177
+ },
178
+ "INT": {
179
+ "signature": "INT | INTEGER",
180
+ "description": "A standard integer data type. Stores whole numbers. Typically 4 bytes with a range of -2,147,483,648 to 2,147,483,647. Variants include TINYINT, SMALLINT, MEDIUMINT, and BIGINT.",
181
+ "type": "datatype",
182
+ "module": "Data Types"
183
+ },
184
+ "BIGINT": {
185
+ "signature": "BIGINT",
186
+ "description": "A large integer data type. Stores whole numbers up to 8 bytes. Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.",
187
+ "type": "datatype",
188
+ "module": "Data Types"
189
+ },
190
+ "VARCHAR": {
191
+ "signature": "VARCHAR(n)",
192
+ "description": "Variable-length character string with a maximum length of n characters. Only uses storage for the actual string length plus a small overhead. Most common string type.",
193
+ "type": "datatype",
194
+ "module": "Data Types"
195
+ },
196
+ "TEXT": {
197
+ "signature": "TEXT",
198
+ "description": "Variable-length character string for storing large text data. Maximum length varies by database (e.g., up to 65,535 bytes in MySQL). Not suitable for indexing in full.",
199
+ "type": "datatype",
200
+ "module": "Data Types"
201
+ },
202
+ "CHAR": {
203
+ "signature": "CHAR(n)",
204
+ "description": "Fixed-length character string. Always uses n bytes of storage, padding with spaces if needed. Suitable for fixed-length data like country codes or status flags.",
205
+ "type": "datatype",
206
+ "module": "Data Types"
207
+ },
208
+ "BOOLEAN": {
209
+ "signature": "BOOLEAN | BOOL",
210
+ "description": "Stores TRUE or FALSE values. Implementation varies: MySQL uses TINYINT(1), PostgreSQL has a native BOOLEAN type. Accepts TRUE/FALSE, 1/0, or YES/NO.",
211
+ "type": "datatype",
212
+ "module": "Data Types"
213
+ },
214
+ "DATE": {
215
+ "signature": "DATE",
216
+ "description": "Stores a calendar date (year, month, day) without time. Format: 'YYYY-MM-DD'. Range varies by database.",
217
+ "type": "datatype",
218
+ "module": "Data Types"
219
+ },
220
+ "TIMESTAMP": {
221
+ "signature": "TIMESTAMP",
222
+ "description": "Stores date and time with timezone awareness (in some databases). Commonly used for recording creation and modification times. Range is limited compared to DATETIME.",
223
+ "type": "datatype",
224
+ "module": "Data Types"
225
+ },
226
+ "DATETIME": {
227
+ "signature": "DATETIME",
228
+ "description": "Stores date and time without timezone information. Format: 'YYYY-MM-DD HH:MM:SS'. Suitable for recording events that are timezone-independent.",
229
+ "type": "datatype",
230
+ "module": "Data Types"
231
+ },
232
+ "FLOAT": {
233
+ "signature": "FLOAT[(precision)]",
234
+ "description": "Approximate numeric data type for floating-point numbers. Subject to rounding errors. Use DECIMAL for exact numeric values like currency.",
235
+ "type": "datatype",
236
+ "module": "Data Types"
237
+ },
238
+ "DECIMAL": {
239
+ "signature": "DECIMAL(precision, scale) | NUMERIC(precision, scale)",
240
+ "description": "Exact numeric data type with specified precision (total digits) and scale (digits after decimal point). Ideal for financial and monetary values.",
241
+ "type": "datatype",
242
+ "module": "Data Types"
243
+ },
244
+ "BLOB": {
245
+ "signature": "BLOB",
246
+ "description": "Binary Large Object. Stores binary data such as images, files, or serialized objects. Maximum size varies by database. Variants include TINYBLOB, MEDIUMBLOB, LONGBLOB.",
247
+ "type": "datatype",
248
+ "module": "Data Types"
249
+ },
250
+ "JSON": {
251
+ "signature": "JSON",
252
+ "description": "Stores JSON (JavaScript Object Notation) data. Supports validation and querying JSON contents. Available in MySQL 5.7+, PostgreSQL 9.2+ (also JSONB for binary storage).",
253
+ "type": "datatype",
254
+ "module": "Data Types"
255
+ },
256
+ "UUID": {
257
+ "signature": "UUID",
258
+ "description": "Stores a Universally Unique Identifier (128-bit value). Common in distributed systems. Native support in PostgreSQL; use CHAR(36) or BINARY(16) in MySQL.",
259
+ "type": "datatype",
260
+ "module": "Data Types"
261
+ },
262
+ "ENUM": {
263
+ "signature": "ENUM('value1', 'value2', ...)",
264
+ "description": "A string object with a value chosen from a list of permitted values. MySQL-specific. PostgreSQL supports creating custom enum types via CREATE TYPE.",
265
+ "type": "datatype",
266
+ "module": "Data Types"
267
+ },
268
+ "COUNT": {
269
+ "signature": "COUNT(*) | COUNT([DISTINCT] expression)",
270
+ "description": "Aggregate function that returns the number of rows. COUNT(*) counts all rows including NULLs. COUNT(column) counts non-NULL values. COUNT(DISTINCT column) counts unique values.",
271
+ "type": "function",
272
+ "module": "Aggregate Functions"
273
+ },
274
+ "SUM": {
275
+ "signature": "SUM([DISTINCT] expression)",
276
+ "description": "Aggregate function that returns the total sum of a numeric column, ignoring NULL values. Returns NULL if no rows match.",
277
+ "type": "function",
278
+ "module": "Aggregate Functions"
279
+ },
280
+ "AVG": {
281
+ "signature": "AVG([DISTINCT] expression)",
282
+ "description": "Aggregate function that returns the average value of a numeric column, ignoring NULL values.",
283
+ "type": "function",
284
+ "module": "Aggregate Functions"
285
+ },
286
+ "MIN": {
287
+ "signature": "MIN(expression)",
288
+ "description": "Aggregate function that returns the smallest value in a column. Works with numeric, string, and date types.",
289
+ "type": "function",
290
+ "module": "Aggregate Functions"
291
+ },
292
+ "MAX": {
293
+ "signature": "MAX(expression)",
294
+ "description": "Aggregate function that returns the largest value in a column. Works with numeric, string, and date types.",
295
+ "type": "function",
296
+ "module": "Aggregate Functions"
297
+ },
298
+ "GROUP_CONCAT": {
299
+ "signature": "GROUP_CONCAT([DISTINCT] expression [ORDER BY ...] [SEPARATOR str])",
300
+ "description": "Concatenates values from multiple rows into a single string. MySQL-specific. PostgreSQL equivalent: STRING_AGG(expression, separator).",
301
+ "type": "function",
302
+ "module": "Aggregate Functions"
303
+ },
304
+ "CONCAT": {
305
+ "signature": "CONCAT(string1, string2, ...)",
306
+ "description": "Concatenates two or more strings. Returns NULL if any argument is NULL (use CONCAT_WS for NULL-safe concatenation). In PostgreSQL, the || operator is also used.",
307
+ "type": "function",
308
+ "module": "String Functions"
309
+ },
310
+ "SUBSTRING": {
311
+ "signature": "SUBSTRING(string, start, length) | SUBSTR(string, start, length)",
312
+ "description": "Extracts a portion of a string starting at the specified position for the given length. Position is 1-based.",
313
+ "type": "function",
314
+ "module": "String Functions"
315
+ },
316
+ "TRIM": {
317
+ "signature": "TRIM([LEADING|TRAILING|BOTH] [chars FROM] string)",
318
+ "description": "Removes leading and/or trailing characters (default: whitespace) from a string.",
319
+ "type": "function",
320
+ "module": "String Functions"
321
+ },
322
+ "UPPER": {
323
+ "signature": "UPPER(string) | UCASE(string)",
324
+ "description": "Converts all characters in a string to uppercase.",
325
+ "type": "function",
326
+ "module": "String Functions"
327
+ },
328
+ "LOWER": {
329
+ "signature": "LOWER(string) | LCASE(string)",
330
+ "description": "Converts all characters in a string to lowercase.",
331
+ "type": "function",
332
+ "module": "String Functions"
333
+ },
334
+ "LENGTH": {
335
+ "signature": "LENGTH(string) | LEN(string)",
336
+ "description": "Returns the number of characters (or bytes, depending on database) in a string. In MySQL, LENGTH returns bytes; use CHAR_LENGTH for characters.",
337
+ "type": "function",
338
+ "module": "String Functions"
339
+ },
340
+ "REPLACE": {
341
+ "signature": "REPLACE(string, old_substring, new_substring)",
342
+ "description": "Replaces all occurrences of a substring within a string with another substring.",
343
+ "type": "function",
344
+ "module": "String Functions"
345
+ },
346
+ "COALESCE": {
347
+ "signature": "COALESCE(value1, value2, ...)",
348
+ "description": "Returns the first non-NULL value from the argument list. Commonly used to provide default values for potentially NULL columns.",
349
+ "type": "function",
350
+ "module": "Conditional Functions"
351
+ },
352
+ "CAST": {
353
+ "signature": "CAST(expression AS data_type)",
354
+ "description": "Converts a value from one data type to another. Standard SQL type conversion function supported by all major databases.",
355
+ "type": "function",
356
+ "module": "Conversion Functions"
357
+ },
358
+ "NOW": {
359
+ "signature": "NOW()",
360
+ "description": "Returns the current date and time as a DATETIME or TIMESTAMP value. In PostgreSQL, equivalent to CURRENT_TIMESTAMP.",
361
+ "type": "function",
362
+ "module": "Date Functions"
363
+ },
364
+ "CURRENT_TIMESTAMP": {
365
+ "signature": "CURRENT_TIMESTAMP",
366
+ "description": "Returns the current date and time. A SQL standard keyword that works across all databases. Does not require parentheses.",
367
+ "type": "function",
368
+ "module": "Date Functions"
369
+ },
370
+ "DATE_ADD": {
371
+ "signature": "DATE_ADD(date, INTERVAL value unit)",
372
+ "description": "Adds a time interval to a date. Units include DAY, MONTH, YEAR, HOUR, MINUTE, SECOND. MySQL-specific; PostgreSQL uses date + INTERVAL syntax.",
373
+ "type": "function",
374
+ "module": "Date Functions"
375
+ },
376
+ "DATEDIFF": {
377
+ "signature": "DATEDIFF(date1, date2)",
378
+ "description": "Returns the difference in days between two dates (date1 - date2). In SQL Server, supports different date parts.",
379
+ "type": "function",
380
+ "module": "Date Functions"
381
+ },
382
+ "EXTRACT": {
383
+ "signature": "EXTRACT(part FROM date)",
384
+ "description": "Extracts a specified part (YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, etc.) from a date or timestamp value. Standard SQL syntax.",
385
+ "type": "function",
386
+ "module": "Date Functions"
387
+ },
388
+ "ROW_NUMBER": {
389
+ "signature": "ROW_NUMBER() OVER ([PARTITION BY column] ORDER BY column [ASC|DESC])",
390
+ "description": "Window function that assigns a unique sequential integer to each row within its partition. Numbering starts at 1 and increments for each row based on ORDER BY.",
391
+ "type": "function",
392
+ "module": "Window Functions"
393
+ },
394
+ "RANK": {
395
+ "signature": "RANK() OVER ([PARTITION BY column] ORDER BY column [ASC|DESC])",
396
+ "description": "Window function that assigns a rank to each row. Rows with equal values get the same rank, and the next rank is skipped (gaps). E.g., 1, 2, 2, 4.",
397
+ "type": "function",
398
+ "module": "Window Functions"
399
+ },
400
+ "DENSE_RANK": {
401
+ "signature": "DENSE_RANK() OVER ([PARTITION BY column] ORDER BY column [ASC|DESC])",
402
+ "description": "Window function that assigns a rank to each row without gaps. Rows with equal values get the same rank, and the next rank follows immediately. E.g., 1, 2, 2, 3.",
403
+ "type": "function",
404
+ "module": "Window Functions"
405
+ },
406
+ "LEAD": {
407
+ "signature": "LEAD(expression [, offset [, default]]) OVER ([PARTITION BY column] ORDER BY column)",
408
+ "description": "Window function that returns the value of an expression from a subsequent row. Offset defaults to 1. Default value replaces NULL when there is no subsequent row.",
409
+ "type": "function",
410
+ "module": "Window Functions"
411
+ },
412
+ "LAG": {
413
+ "signature": "LAG(expression [, offset [, default]]) OVER ([PARTITION BY column] ORDER BY column)",
414
+ "description": "Window function that returns the value of an expression from a preceding row. Offset defaults to 1. Useful for comparing a row with its predecessor.",
415
+ "type": "function",
416
+ "module": "Window Functions"
417
+ },
418
+ "NTILE": {
419
+ "signature": "NTILE(num_buckets) OVER ([PARTITION BY column] ORDER BY column)",
420
+ "description": "Window function that distributes rows into a specified number of approximately equal groups. Each row is assigned a bucket number from 1 to num_buckets.",
421
+ "type": "function",
422
+ "module": "Window Functions"
423
+ },
424
+ "PRIMARY KEY": {
425
+ "signature": "column_name data_type PRIMARY KEY | CONSTRAINT pk_name PRIMARY KEY (column1, ...)",
426
+ "description": "A constraint that uniquely identifies each row in a table. Combines NOT NULL and UNIQUE. Each table can have only one primary key, which can span multiple columns (composite key).",
427
+ "type": "constraint",
428
+ "module": "Constraints"
429
+ },
430
+ "FOREIGN KEY": {
431
+ "signature": "FOREIGN KEY (column) REFERENCES parent_table(parent_column) [ON DELETE action] [ON UPDATE action]",
432
+ "description": "A constraint that enforces referential integrity between tables. ON DELETE/UPDATE actions: CASCADE, SET NULL, RESTRICT, NO ACTION, SET DEFAULT.",
433
+ "type": "constraint",
434
+ "module": "Constraints"
435
+ },
436
+ "BEGIN": {
437
+ "signature": "BEGIN [TRANSACTION | WORK]",
438
+ "description": "Starts a new transaction. All subsequent statements are part of the transaction until COMMIT or ROLLBACK is issued.",
439
+ "type": "keyword",
440
+ "module": "TCL"
441
+ },
442
+ "COMMIT": {
443
+ "signature": "COMMIT [WORK]",
444
+ "description": "Saves all changes made during the current transaction permanently to the database. Releases any locks held by the transaction.",
445
+ "type": "keyword",
446
+ "module": "TCL"
447
+ },
448
+ "ROLLBACK": {
449
+ "signature": "ROLLBACK [WORK] [TO SAVEPOINT savepoint_name]",
450
+ "description": "Undoes all changes made during the current transaction, or rolls back to a specific savepoint. Releases locks held by the transaction.",
451
+ "type": "keyword",
452
+ "module": "TCL"
453
+ },
454
+ "GRANT": {
455
+ "signature": "GRANT privilege_type ON object TO user [WITH GRANT OPTION]",
456
+ "description": "Grants specific privileges (SELECT, INSERT, UPDATE, DELETE, ALL) on database objects to users or roles. WITH GRANT OPTION allows the user to grant the same privilege to others.",
457
+ "type": "keyword",
458
+ "module": "DCL"
459
+ },
460
+ "REVOKE": {
461
+ "signature": "REVOKE privilege_type ON object FROM user",
462
+ "description": "Removes previously granted privileges from a user or role.",
463
+ "type": "keyword",
464
+ "module": "DCL"
465
+ },
466
+ "EXPLAIN": {
467
+ "signature": "EXPLAIN [ANALYZE] query",
468
+ "description": "Displays the query execution plan used by the database optimizer. EXPLAIN ANALYZE actually executes the query and shows real timing data. Essential for performance tuning.",
469
+ "type": "keyword",
470
+ "module": "Utility"
471
+ }
472
+ }
473
+ }