|
7 | 7 | <string>sql</string>
|
8 | 8 | <string>ddl</string>
|
9 | 9 | <string>dml</string>
|
| 10 | + <string>tsql</string> |
10 | 11 | </array>
|
11 | 12 | <key>foldingStartMarker</key>
|
12 | 13 | <string>\s*\(\s*$</string>
|
|
223 | 224 | |\b(char|varchar\d?)\b(?:\((\d+)\))?
|
224 | 225 |
|
225 | 226 | # special case, capture 6 + 7i + 8i
|
226 |
| - |\b(numeric)\b(?:\((\d+),(\d+)\))? |
| 227 | + |\b(numeric|decimal)\b(?:\((\d+),(\d+)\))? |
227 | 228 |
|
228 | 229 | # special case, captures 9, 10i, 11
|
229 |
| - |\b(times)(?:\((\d+)\))(\swithoutstimeszone\b)? |
| 230 | + |\b(times)(?:\((\d+)\))(\swith(?:out)?\stime\szone\b)? |
230 | 231 |
|
231 | 232 | # special case, captures 12, 13, 14i, 15
|
232 |
| - |\b(timestamp)(?:(s)\((\d+)\)(\swithoutstimeszone\b)?)? |
| 233 | + |\b(timestamp)(?:(s)\((\d+)\)(\swith(?:out)?\stime\szone\b)?)? |
233 | 234 |
|
234 | 235 | </string>
|
235 | 236 | </dict>
|
|
283 | 284 | </dict>
|
284 | 285 | <dict>
|
285 | 286 | <key>comment</key>
|
286 |
| - <string>Reserved keywords: https://msdn.microsoft.com/en-us/library/ms189822.aspx</string> |
| 287 | + <string>Reserved keywords: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql</string> |
287 | 288 | <key>match</key>
|
288 |
| - <string>(?i:\b(add|external|procedure|all|fetch|public|alter|file|raiserror|and|fillfactor|read|any|for|readtext|as|foreign|reconfigure|asc|freetext|references|authorization|freetexttable|replication|backup|from|restore|begin|full|restrict|between|function|return|break|goto|revert|browse|grant|revoke|bulk|group|right|by|having|rollback|cascade|holdlock|rowcount|case|identity|rowguidcol|check|identity_insert|rule|checkpoint|identitycol|save|close|if|schema|clustered|in|securityaudit|coalesce|index|select|collate|inner|semantickeyphrasetable|column|insert|semanticsimilaritydetailstable|commit|intersect|semanticsimilaritytable|compute|into|session_user|constraint|is|set|contains|join|setuser|containstable|key|shutdown|continue|kill|some|convert|left|statistics|create|like|system_user|cross|lineno|table|current|load|tablesample|current_date|merge|textsize|current_time|national|then|current_timestamp|nocheck|to|current_user|nonclustered|top|cursor|not|tran|database|null|transaction|dbcc|nullif|trigger|deallocate|of|truncate|declare|off|try_convert|default|offsets|tsequal|delete|on|union|deny|open|unique|desc|opendatasource|unpivot|disk|openquery|update|distinct|openrowset|updatetext|distributed|openxml|use|double|option|user|drop|or|values|dump|order|varying|else|outer|view|end|over|waitfor|errlvl|percent|when|escape|pivot|where|except|plan|while|exec|precision|with|execute|primary|within group|exists|print|writetext|exit|proc)\b)</string> |
| 289 | + <string>(?i:\b(add|external|procedure|all|fetch|public|alter|file|raiserror|and|fillfactor|read|any|for|readtext|as|foreign|reconfigure|asc|freetext|references|authorization|freetexttable|replication|backup|from|restore|begin|full|restrict|between|function|return|break|goto|revert|browse|grant|revoke|bulk|group|right|by|having|rollback|cascade|holdlock|rowcount|case|identity|rowguidcol|check|identity_insert|rule|checkpoint|identitycol|save|close|if|schema|clustered|in|securityaudit|coalesce|index|select|collate|inner|semantickeyphrasetable|column|insert|semanticsimilaritydetailstable|commit|intersect|semanticsimilaritytable|compute|into|session_user|constraint|is|set|contains|join|setuser|containstable|key|shutdown|continue|kill|some|convert|left|statistics|create|like|system_user|cross|lineno|table|current|load|tablesample|current_date|merge|textsize|current_time|national|then|current_timestamp|nocheck|to|current_user|nonclustered|top|cursor|not|tran|database|null|transaction|dbcc|nullif|trigger|deallocate|of|truncate|declare|off|try_convert|default|offsets|tsequal|delete|on|union|deny|open|unique|desc|opendatasource|unpivot|disk|openquery|update|distinct|openrowset|updatetext|distributed|openxml|use|double|option|user|drop|or|values|dump|order|varying|else|outer|view|end|over|waitfor|errlvl|percent|when|escape|pivot|where|except|plan|while|exec|precision|with|execute|primary|within\sgroup|exists|print|writetext|exit|proc)\b)</string> |
289 | 290 | <key>name</key>
|
290 | 291 | <string>keyword.other.reserved.sql</string>
|
291 | 292 | </dict>
|
292 | 293 | <dict>
|
293 | 294 | <key>comment</key>
|
294 |
| - <string>Control-of-flow keywords: https://msdn.microsoft.com/en-us//library/ms174290.aspx</string> |
| 295 | + <string>Control-of-flow keywords: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/control-of-flow</string> |
295 | 296 | <key>match</key>
|
296 |
| - <string>(?i:\b(BEGIN|END|RETURN|break|THROW|CONTINUE|TRY|CATCH|GOTO|WAITFOR|IF|ELSE|WHILE)\b)</string> |
| 297 | + <string>(?i:\b(begin|end|return|break|throw|continue|try|catch|goto|waitfor|if|else|while)\b)</string> |
297 | 298 | <key>name</key>
|
298 | 299 | <string>keyword.other.reserved.sql</string>
|
299 | 300 | </dict>
|
|
367 | 368 | </dict>
|
368 | 369 | <dict>
|
369 | 370 | <key>comment</key>
|
370 |
| - <string>Rowset functions: https://msdn.microsoft.com/en-us/library/ms187957.aspx</string> |
| 371 | + <string>Rowset functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/rowset-functions-transact-sql</string> |
371 | 372 | <key>match</key>
|
372 | 373 | <string>(?i)\b(opendatasource|openrowset|openquery|openxml)\b</string>
|
373 | 374 | <key>name</key>
|
374 | 375 | <string>support.function.rowset.sql</string>
|
375 | 376 | </dict>
|
376 | 377 | <dict>
|
377 | 378 | <key>comment</key>
|
378 |
| - <string>Aggregate Functions: https://msdn.microsoft.com/en-us/library/ms173454.aspx</string> |
| 379 | + <string>Aggregate Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/aggregate-functions-transact-sql</string> |
379 | 380 | <key>match</key>
|
380 | 381 | <string>(?i)\b(avg|min|checksum_agg|sum|count|stdev|count_big|stdevp|grouping|var|grouping_id|varp|max)\b</string>
|
381 | 382 | <key>name</key>
|
382 | 383 | <string>support.function.aggr.sql</string>
|
383 | 384 | </dict>
|
384 | 385 | <dict>
|
385 | 386 | <key>comment</key>
|
386 |
| - <string>Ranking Functions: https://msdn.microsoft.com/en-us/library/ms189798.aspx</string> |
| 387 | + <string>Ranking Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/ranking-functions-transact-sql</string> |
387 | 388 | <key>match</key>
|
388 | 389 | <string>(?i)\b(rank|ntile|dense_rank|row_number)\b</string>
|
389 | 390 | <key>name</key>
|
390 | 391 | <string>support.function.ranking.sql</string>
|
391 | 392 | </dict>
|
392 | 393 | <dict>
|
393 | 394 | <key>comment</key>
|
394 |
| - <string>Configuration Functions: https://msdn.microsoft.com/en-us/library/ms173823.aspx</string> |
| 395 | + <string>Analytic Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/analytic-functions-transact-sql</string> |
| 396 | + <key>match</key> |
| 397 | + <string>(?i)\b(cume_dist|lead|first_value|percentile_cont|lag|percentile_disc|last_value|percent_rank)\b</string> |
| 398 | + <key>name</key> |
| 399 | + <string>support.function.analytic.sql</string> |
| 400 | + </dict> |
| 401 | + <dict> |
| 402 | + <key>comment</key> |
| 403 | + <string>Collation Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/collation-functions-collationproperty-transact-sql</string> |
| 404 | + <key>match</key> |
| 405 | + <string>(?i)\b(collationproperty|tertiary_weights)\b</string> |
| 406 | + <key>name</key> |
| 407 | + <string>support.function.collation.sql</string> |
| 408 | + </dict> |
| 409 | + <dict> |
| 410 | + <key>comment</key> |
| 411 | + <string>Configuration Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/configuration-functions-transact-sql</string> |
395 | 412 | <key>match</key>
|
396 | 413 | <string>(?i)@@\b(datefirst|options|dbts|remserver|langid|servername|language|servicename|lock_timeout|spid|max_connections|textsize|max_precision|version|nestlevel)\b</string>
|
397 | 414 | <key>name</key>
|
398 | 415 | <string>support.function.config.sql</string>
|
399 | 416 | </dict>
|
400 | 417 | <dict>
|
401 | 418 | <key>comment</key>
|
402 |
| - <string>Conversion Functions: https://msdn.microsoft.com/en-us/library/hh231076.aspx</string> |
| 419 | + <string>Conversion Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/conversion-functions-transact-sql</string> |
403 | 420 | <key>match</key>
|
404 | 421 | <string>(?i)\b(cast|convert|parse|try_cast|try_convert|try_parse)\b</string>
|
405 | 422 | <key>name</key>
|
406 | 423 | <string>support.function.rowset.sql</string>
|
407 | 424 | </dict>
|
408 | 425 | <dict>
|
409 | 426 | <key>comment</key>
|
410 |
| - <string>Cursor Functions: https://msdn.microsoft.com/en-us/library/ms186285.aspx</string> |
| 427 | + <string>Cryptographic Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/cryptographic-functions-transact-sql</string> |
| 428 | + <key>match</key> |
| 429 | + <string>(?i)\b(encryptbykey|decryptbykey|encryptbypassphrase|decryptbypassphrase|key_id|key_guid|decryptbykeyautoasymkey|key_name|symkeyproperty|encryptbyasymkey|decryptbyasymkey|encryptbycert|decryptbycert|asymkeyproperty|asymkey_id|signbyasymkey|verifysignedbyasmkey|signbycert|verigysignedbycert|is_objectsigned|decryptbykeyautocert|hashbytes)\b</string> |
| 430 | + <key>name</key> |
| 431 | + <string>support.function.crypto.sql</string> |
| 432 | + </dict> |
| 433 | + <dict> |
| 434 | + <key>comment</key> |
| 435 | + <string>Cursor Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/cursor-functions-transact-sql</string> |
411 | 436 | <key>match</key>
|
412 | 437 | <string>(?i)(@@\b(cursor_rows|fetch_status)|cursor_status)\b</string>
|
413 | 438 | <key>name</key>
|
414 | 439 | <string>support.function.cursor.sql</string>
|
415 | 440 | </dict>
|
416 | 441 | <dict>
|
417 | 442 | <key>comment</key>
|
418 |
| - <string>Date and time Functions: https://msdn.microsoft.com/en-us/library/ms186724.aspx</string> |
| 443 | + <string>Data Type Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/data-type-functions-transact-sql</string> |
419 | 444 | <key>match</key>
|
420 |
| - <string>(?i)\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_timestamp|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|eomonth|switchoffset|todatetimeoffset|isdate)|@@\b(datefirst|language)\b</string> |
| 445 | + <string>(?i)(@@\b(datalength|ident_seed|ident_current|identity|ident_incr|sql_variant_property)\b</string> |
| 446 | + <key>name</key> |
| 447 | + <string>support.function.datatype.sql</string> |
| 448 | + </dict> |
| 449 | + <dict> |
| 450 | + <key>comment</key> |
| 451 | + <string>Date and time Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/date-and-time-data-types-and-functions-transact-sql</string> |
| 452 | + <key>match</key> |
| 453 | + <string>(?i)\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_timestamp|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|datediff_big|dateadd|eomonth|switchoffset|todatetimeoffset|isdate)|@@\b(datefirst|language)\b</string> |
421 | 454 | <key>name</key>
|
422 | 455 | <string>support.function.datetime.sql</string>
|
423 | 456 | </dict>
|
424 | 457 | <dict>
|
425 | 458 | <key>comment</key>
|
426 |
| - <string>Logical Functions: https://msdn.microsoft.com/en-us/library/hh213226.aspx</string> |
| 459 | + <string>JSON Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/json-functions-transact-sql</string> |
| 460 | + <key>match</key> |
| 461 | + <string>(?i)\b(isjson|json_value|json_query|json_modify)\b</string> |
| 462 | + <key>name</key> |
| 463 | + <string>support.function.json.sql</string> |
| 464 | + </dict> |
| 465 | + <dict> |
| 466 | + <key>comment</key> |
| 467 | + <string>Logical Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/logical-functions-choose-transact-sql</string> |
427 | 468 | <key>match</key>
|
428 | 469 | <string>(?i)\b(choose|iif)\b</string>
|
429 | 470 | <key>name</key>
|
430 | 471 | <string>support.function.logical.sql</string>
|
431 | 472 | </dict>
|
432 | 473 | <dict>
|
433 | 474 | <key>comment</key>
|
434 |
| - <string>Mathematical Functions: https://msdn.microsoft.com/en-us/library/ms177516.aspx</string> |
| 475 | + <string>Mathematical Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/mathematical-functions-transact-sql</string> |
435 | 476 | <key>match</key>
|
436 | 477 | <string>(?i)\b(abs|degrees|rand|acos|exp|round|asin|floor|sign|atan|log|sin|atn2|log10|sqrt|ceiling|pi|square|cos|power|tan|cot|radians)\b</string>
|
437 | 478 | <key>name</key>
|
438 | 479 | <string>support.function.math.sql</string>
|
439 | 480 | </dict>
|
440 | 481 | <dict>
|
441 | 482 | <key>comment</key>
|
442 |
| - <string>Metadata Functions: https://msdn.microsoft.com/en-us/library/ms187812.aspx</string> |
| 483 | + <string>Metadata Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/metadata-functions-transact-sql</string> |
443 | 484 | <key>match</key>
|
444 | 485 | <string>(?i)@@\b(procid)|\b(index_col|app_name|indexkey_property|applock_mode|indexproperty|applock_test|next value for|assemblyproperty|object_definition|col_length|object_id|col_name|object_name|columnproperty|object_schema_name|database_principal_id|objectproperty|databasepropertyex|objectpropertyex|db_id|original_db_name|db_name|parsename|file_id|schema_id|file_idex|schema_name|file_name|scope_identity|filegroup_id|serverproperty|filegroup_name|stats_date|filegroupproperty|type_id|fileproperty|type_name|fulltextcatalogproperty|typeproperty|fulltextserviceproperty)\b</string>
|
445 | 486 | <key>name</key>
|
446 | 487 | <string>support.function.metadata.sql</string>
|
447 | 488 | </dict>
|
448 | 489 | <dict>
|
449 | 490 | <key>comment</key>
|
450 |
| - <string>Security Functions: https://msdn.microsoft.com/en-us/library/ms186236.aspx</string> |
| 491 | + <string>Replication Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/replication-functions-publishingservername</string> |
| 492 | + <key>match</key> |
| 493 | + <string>(?i)\b(publishingservername)\b</string> |
| 494 | + <key>name</key> |
| 495 | + <string>support.function.replication.sql</string> |
| 496 | + </dict> |
| 497 | + <dict> |
| 498 | + <key>comment</key> |
| 499 | + <string>Security Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/security-functions-transact-sql</string> |
451 | 500 | <key>match</key>
|
452 | 501 | <string>(?i)\b(certencoded|pwdcompare|certprivatekey|pwdencrypt|current_user|schema_id|database_principal_id|schema_name|session_user|suser_id|suser_sid|has_perms_by_name|suser_sname|is_member|system_user|is_rolemember|suser_name|is_srvrolemember|user_id|original_login|user_name|permissions)\b</string>
|
453 | 502 | <key>name</key>
|
454 | 503 | <string>support.function.security.sql</string>
|
455 | 504 | </dict>
|
456 | 505 | <dict>
|
457 | 506 | <key>comment</key>
|
458 |
| - <string>String Functions: https://msdn.microsoft.com/en-us/library/ms181984.aspx</string> |
| 507 | + <string>String Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/string-functions-transact-sql</string> |
459 | 508 | <key>match</key>
|
460 |
| - <string>(?i)\b(ascii|ltrim|soundex|char|nchar|space|charindex|patindex|str|concat|quotename|stuff|difference|replace|substring|format|replicate|unicode|left|reverse|upper|len|right|lower|rtrim)\b</string> |
| 509 | + <string>(?i)\b(ascii|char|charindex|concat|concat_ws|difference|format|left|len|lower|ltrim|nchar|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\b</string> |
461 | 510 | <key>name</key>
|
462 | 511 | <string>support.function.string.sql</string>
|
463 | 512 | </dict>
|
464 | 513 | <dict>
|
465 | 514 | <key>comment</key>
|
466 |
| - <string>System Functions: https://msdn.microsoft.com/en-us/library/ms187786.aspx</string> |
| 515 | + <string>System Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/system-functions-transact-sql</string> |
467 | 516 | <key>match</key>
|
468 | 517 | <string>(?i)\$\b(partition)|@@\b(error|identity|pack_received|rowcount|trancount)|\b(error_severity|error_state|formatmessage|getansinull|get_filestream_transaction_context|host_id|binary_checksum|host_name|checksum|isnull|connectionproperty|isnumeric|context_info|min_active_rowversion|current_request_id|newid|error_line|newsequentialid|error_message|rowcount_big|error_number|xact_state|error_procedure)\b</string>
|
469 | 518 | <key>name</key>
|
470 | 519 | <string>support.function.system.sql</string>
|
471 | 520 | </dict>
|
472 | 521 | <dict>
|
473 | 522 | <key>comment</key>
|
474 |
| - <string>System Statistical Functions: https://msdn.microsoft.com/en-us/library/ms177520.aspx</string> |
| 523 | + <string>System Statistical Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/system-statistical-functions-transact-sql</string> |
475 | 524 | <key>match</key>
|
476 | 525 | <string>(?i)@@\b(connections|pack_received|cpu_busy|pack_sent|timeticks|idle|total_errors|io_busy|total_read|packet_errors|total_write)\b</string>
|
477 | 526 | <key>name</key>
|
478 | 527 | <string>support.function.system-stats.sql</string>
|
479 | 528 | </dict>
|
480 | 529 | <dict>
|
481 | 530 | <key>comment</key>
|
482 |
| - <string>Text and image Functions: https://msdn.microsoft.com/en-us/library/ms188353.aspx</string> |
| 531 | + <string>Text and image Functions: https://docs.microsoft.com/en-us/sql/t-sql/functions/text-and-image-functions-textptr-transact-sql</string> |
483 | 532 | <key>match</key>
|
484 | 533 | <string>(?i)\b(patindex|textvalid|textptr)\b</string>
|
485 | 534 | <key>name</key>
|
486 |
| - <string>support.function.text&image.sql</string> |
| 535 | + <string>support.function.text-image.sql</string> |
487 | 536 | </dict>
|
488 | 537 | <dict>
|
489 | 538 | <key>include</key>
|
|
0 commit comments