| 1 |
{ |
| 2 |
"information_for_contributors": [ |
| 3 |
"This file has been converted from https://github.com/microsoft/vscode-mssql/blob/master/syntaxes/SQL.plist", |
| 4 |
"If you want to provide a fix or improvement, please create a pull request against the original repository.", |
| 5 |
"Once accepted there, we are happy to receive an update request." |
| 6 |
], |
| 7 |
"version": "https://github.com/microsoft/vscode-mssql/commit/b8b58864526c048002b7c3964bdac8aac3713bd9", |
| 8 |
"name": "sql", |
| 9 |
"scopeName": "source.sql", |
| 10 |
"patterns": [ |
| 11 |
{ |
| 12 |
"match": "((?<!@)@)\\b(\\w+)\\b", |
| 13 |
"name": "text.variable" |
| 14 |
}, |
| 15 |
{ |
| 16 |
"match": "(\\[)[^\\]]*(\\])", |
| 17 |
"name": "text.bracketed" |
| 18 |
}, |
| 19 |
{ |
| 20 |
"match": "\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blocksize|bmk|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+or\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|days|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hours|http|identity|identity_value|if|ifnull|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minutes|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|schema|schemabinding|scoped|scroll|scroll_locks|sddl|secexpr|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|tran|transaction|transfer|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|waitfor|webmethod|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|window|windows|with|within|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|zone)\\b", |
| 21 |
"name": "keyword.other.sql" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"include": "#comments" |
| 25 |
}, |
| 26 |
{ |
| 27 |
"captures": { |
| 28 |
"1": { |
| 29 |
"name": "keyword.other.create.sql" |
| 30 |
}, |
| 31 |
"2": { |
| 32 |
"name": "keyword.other.sql" |
| 33 |
}, |
| 34 |
"5": { |
| 35 |
"name": "entity.name.function.sql" |
| 36 |
} |
| 37 |
}, |
| 38 |
"match": "(?i:^\\s*(create(?:\\s+or\\s+replace)?)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)(['\"`]?)(\\w+)\\4", |
| 39 |
"name": "meta.create.sql" |
| 40 |
}, |
| 41 |
{ |
| 42 |
"captures": { |
| 43 |
"1": { |
| 44 |
"name": "keyword.other.create.sql" |
| 45 |
}, |
| 46 |
"2": { |
| 47 |
"name": "keyword.other.sql" |
| 48 |
} |
| 49 |
}, |
| 50 |
"match": "(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))", |
| 51 |
"name": "meta.drop.sql" |
| 52 |
}, |
| 53 |
{ |
| 54 |
"captures": { |
| 55 |
"1": { |
| 56 |
"name": "keyword.other.create.sql" |
| 57 |
}, |
| 58 |
"2": { |
| 59 |
"name": "keyword.other.table.sql" |
| 60 |
}, |
| 61 |
"3": { |
| 62 |
"name": "entity.name.function.sql" |
| 63 |
}, |
| 64 |
"4": { |
| 65 |
"name": "keyword.other.cascade.sql" |
| 66 |
} |
| 67 |
}, |
| 68 |
"match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)", |
| 69 |
"name": "meta.drop.sql" |
| 70 |
}, |
| 71 |
{ |
| 72 |
"captures": { |
| 73 |
"1": { |
| 74 |
"name": "keyword.other.create.sql" |
| 75 |
}, |
| 76 |
"2": { |
| 77 |
"name": "keyword.other.table.sql" |
| 78 |
} |
| 79 |
}, |
| 80 |
"match": "(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)", |
| 81 |
"name": "meta.alter.sql" |
| 82 |
}, |
| 83 |
{ |
| 84 |
"captures": { |
| 85 |
"1": { |
| 86 |
"name": "storage.type.sql" |
| 87 |
}, |
| 88 |
"2": { |
| 89 |
"name": "storage.type.sql" |
| 90 |
}, |
| 91 |
"3": { |
| 92 |
"name": "constant.numeric.sql" |
| 93 |
}, |
| 94 |
"4": { |
| 95 |
"name": "storage.type.sql" |
| 96 |
}, |
| 97 |
"5": { |
| 98 |
"name": "constant.numeric.sql" |
| 99 |
}, |
| 100 |
"6": { |
| 101 |
"name": "storage.type.sql" |
| 102 |
}, |
| 103 |
"7": { |
| 104 |
"name": "constant.numeric.sql" |
| 105 |
}, |
| 106 |
"8": { |
| 107 |
"name": "constant.numeric.sql" |
| 108 |
}, |
| 109 |
"9": { |
| 110 |
"name": "storage.type.sql" |
| 111 |
}, |
| 112 |
"10": { |
| 113 |
"name": "constant.numeric.sql" |
| 114 |
}, |
| 115 |
"11": { |
| 116 |
"name": "storage.type.sql" |
| 117 |
}, |
| 118 |
"12": { |
| 119 |
"name": "storage.type.sql" |
| 120 |
}, |
| 121 |
"13": { |
| 122 |
"name": "storage.type.sql" |
| 123 |
}, |
| 124 |
"14": { |
| 125 |
"name": "constant.numeric.sql" |
| 126 |
}, |
| 127 |
"15": { |
| 128 |
"name": "storage.type.sql" |
| 129 |
} |
| 130 |
}, |
| 131 |
"match": "(?xi)\n\n\t\t\t\t# normal stuff, capture 1\n\t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\t\t\t\t# numeric suffix, capture 2 + 3i\n\t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\t\t\t\t# optional numeric suffix, capture 4 + 5i\n\t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# special case, capture 6 + 7i + 8i\n\t\t\t\t|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\t\t\t\t# special case, captures 9, 10i, 11\n\t\t\t\t|\\b(times?)\\b(?:\\((\\d+)\\))?(\\swith(?:out)?\\stime\\szone\\b)?\n\n\t\t\t\t# special case, captures 12, 13, 14i, 15\n\t\t\t\t|\\b(timestamp)(?:(s|tz))?\\b(?:\\((\\d+)\\))?(\\s(with|without)\\stime\\szone\\b)?\n\n\t\t\t" |
| 132 |
}, |
| 133 |
{ |
| 134 |
"match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|nocheck|check|constraint|collate|default)\\b)", |
| 135 |
"name": "storage.modifier.sql" |
| 136 |
}, |
| 137 |
{ |
| 138 |
"match": "\\b\\d+\\b", |
| 139 |
"name": "constant.numeric.sql" |
| 140 |
}, |
| 141 |
{ |
| 142 |
"match": "(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\s+by|or|like|and|union(\\s+all)?|having|order\\s+by|limit|(inner|cross)\\s+join|join|straight_join|full\\s+outer\\s+join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)", |
| 143 |
"name": "keyword.other.DML.sql" |
| 144 |
}, |
| 145 |
{ |
| 146 |
"match": "(?i:\\b(on|off|((is\\s+)?not\\s+)?null)\\b)", |
| 147 |
"name": "keyword.other.DDL.create.II.sql" |
| 148 |
}, |
| 149 |
{ |
| 150 |
"match": "(?i:\\bvalues\\b)", |
| 151 |
"name": "keyword.other.DML.II.sql" |
| 152 |
}, |
| 153 |
{ |
| 154 |
"match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)", |
| 155 |
"name": "keyword.other.LUW.sql" |
| 156 |
}, |
| 157 |
{ |
| 158 |
"match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)", |
| 159 |
"name": "keyword.other.authorization.sql" |
| 160 |
}, |
| 161 |
{ |
| 162 |
"match": "(?i:\\bin\\b)", |
| 163 |
"name": "keyword.other.data-integrity.sql" |
| 164 |
}, |
| 165 |
{ |
| 166 |
"match": "(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)", |
| 167 |
"name": "keyword.other.object-comments.sql" |
| 168 |
}, |
| 169 |
{ |
| 170 |
"match": "(?i)\\bAS\\b", |
| 171 |
"name": "keyword.other.alias.sql" |
| 172 |
}, |
| 173 |
{ |
| 174 |
"match": "(?i)\\b(DESC|ASC)\\b", |
| 175 |
"name": "keyword.other.order.sql" |
| 176 |
}, |
| 177 |
{ |
| 178 |
"match": "\\*", |
| 179 |
"name": "keyword.operator.star.sql" |
| 180 |
}, |
| 181 |
{ |
| 182 |
"match": "[!<>]?=|<>|<|>", |
| 183 |
"name": "keyword.operator.comparison.sql" |
| 184 |
}, |
| 185 |
{ |
| 186 |
"match": "-|\\+|/", |
| 187 |
"name": "keyword.operator.math.sql" |
| 188 |
}, |
| 189 |
{ |
| 190 |
"match": "\\|\\|", |
| 191 |
"name": "keyword.operator.concatenator.sql" |
| 192 |
}, |
| 193 |
{ |
| 194 |
"match": "(?i)\\b(aggregate|approx_count_distinct|avg|checksum_agg|count|count_big|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\b", |
| 195 |
"name": "support.function.aggregate.sql" |
| 196 |
}, |
| 197 |
{ |
| 198 |
"match": "(?i)\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\b", |
| 199 |
"name": "support.function.analytic.sql" |
| 200 |
}, |
| 201 |
{ |
| 202 |
"match": "(?i)\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\b", |
| 203 |
"name": "support.function.conversion.sql" |
| 204 |
}, |
| 205 |
{ |
| 206 |
"match": "(?i)\\b(collationproperty|tertiary_weights)\\b", |
| 207 |
"name": "support.function.collation.sql" |
| 208 |
}, |
| 209 |
{ |
| 210 |
"match": "(?i)\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\b", |
| 211 |
"name": "support.function.cryptographic.sql" |
| 212 |
}, |
| 213 |
{ |
| 214 |
"match": "(?i)\\b(cursor_status)\\b", |
| 215 |
"name": "support.function.cursor.sql" |
| 216 |
}, |
| 217 |
{ |
| 218 |
"match": "(?i)\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\b", |
| 219 |
"name": "support.function.datetime.sql" |
| 220 |
}, |
| 221 |
{ |
| 222 |
"match": "(?i)\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\b", |
| 223 |
"name": "support.function.datatype.sql" |
| 224 |
}, |
| 225 |
{ |
| 226 |
"match": "(?i)\\b(coalesce|nullif)\\b", |
| 227 |
"name": "support.function.expression.sql" |
| 228 |
}, |
| 229 |
{ |
| 230 |
"match": "(?<!@)@@(?i)\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\b", |
| 231 |
"name": "support.function.globalvar.sql" |
| 232 |
}, |
| 233 |
{ |
| 234 |
"match": "(?i)\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\b", |
| 235 |
"name": "support.function.json.sql" |
| 236 |
}, |
| 237 |
{ |
| 238 |
"match": "(?i)\\b(choose|iif|greatest|least)\\b", |
| 239 |
"name": "support.function.logical.sql" |
| 240 |
}, |
| 241 |
{ |
| 242 |
"match": "(?i)\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\b", |
| 243 |
"name": "support.function.mathematical.sql" |
| 244 |
}, |
| 245 |
{ |
| 246 |
"match": "(?i)\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\b", |
| 247 |
"name": "support.function.metadata.sql" |
| 248 |
}, |
| 249 |
{ |
| 250 |
"match": "(?i)\\b(rank|dense_rank|ntile|row_number)\\b", |
| 251 |
"name": "support.function.ranking.sql" |
| 252 |
}, |
| 253 |
{ |
| 254 |
"match": "(?i)\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\b", |
| 255 |
"name": "support.function.rowset.sql" |
| 256 |
}, |
| 257 |
{ |
| 258 |
"match": "(?i)\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\b", |
| 259 |
"name": "support.function.security.sql" |
| 260 |
}, |
| 261 |
{ |
| 262 |
"match": "(?i)\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\b", |
| 263 |
"name": "support.function.string.sql" |
| 264 |
}, |
| 265 |
{ |
| 266 |
"match": "(?i)\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\b", |
| 267 |
"name": "support.function.system.sql" |
| 268 |
}, |
| 269 |
{ |
| 270 |
"match": "(?i)\\b(patindex|textptr|textvalid)\\b", |
| 271 |
"name": "support.function.textimage.sql" |
| 272 |
}, |
| 273 |
{ |
| 274 |
"captures": { |
| 275 |
"1": { |
| 276 |
"name": "constant.other.database-name.sql" |
| 277 |
}, |
| 278 |
"2": { |
| 279 |
"name": "constant.other.table-name.sql" |
| 280 |
} |
| 281 |
}, |
| 282 |
"match": "(\\w+?)\\.(\\w+)" |
| 283 |
}, |
| 284 |
{ |
| 285 |
"include": "#strings" |
| 286 |
}, |
| 287 |
{ |
| 288 |
"include": "#regexps" |
| 289 |
}, |
| 290 |
{ |
| 291 |
"captures": { |
| 292 |
"1": { |
| 293 |
"name": "punctuation.section.scope.begin.sql" |
| 294 |
}, |
| 295 |
"2": { |
| 296 |
"name": "punctuation.section.scope.end.sql" |
| 297 |
} |
| 298 |
}, |
| 299 |
"comment": "Allow for special ↩ behavior", |
| 300 |
"match": "(\\()(\\))", |
| 301 |
"name": "meta.block.sql" |
| 302 |
} |
| 303 |
], |
| 304 |
"repository": { |
| 305 |
"comments": { |
| 306 |
"patterns": [ |
| 307 |
{ |
| 308 |
"begin": "(^[ \\t]+)?(?=--)", |
| 309 |
"beginCaptures": { |
| 310 |
"1": { |
| 311 |
"name": "punctuation.whitespace.comment.leading.sql" |
| 312 |
} |
| 313 |
}, |
| 314 |
"end": "(?!\\G)", |
| 315 |
"patterns": [ |
| 316 |
{ |
| 317 |
"begin": "--", |
| 318 |
"beginCaptures": { |
| 319 |
"0": { |
| 320 |
"name": "punctuation.definition.comment.sql" |
| 321 |
} |
| 322 |
}, |
| 323 |
"end": "\\n", |
| 324 |
"name": "comment.line.double-dash.sql" |
| 325 |
} |
| 326 |
] |
| 327 |
}, |
| 328 |
{ |
| 329 |
"begin": "(^[ \\t]+)?(?=#)", |
| 330 |
"beginCaptures": { |
| 331 |
"1": { |
| 332 |
"name": "punctuation.whitespace.comment.leading.sql" |
| 333 |
} |
| 334 |
}, |
| 335 |
"end": "(?!\\G)", |
| 336 |
"patterns": [] |
| 337 |
}, |
| 338 |
{ |
| 339 |
"begin": "/\\*", |
| 340 |
"captures": { |
| 341 |
"0": { |
| 342 |
"name": "punctuation.definition.comment.sql" |
| 343 |
} |
| 344 |
}, |
| 345 |
"end": "\\*/", |
| 346 |
"name": "comment.block.c" |
| 347 |
} |
| 348 |
] |
| 349 |
}, |
| 350 |
"regexps": { |
| 351 |
"patterns": [ |
| 352 |
{ |
| 353 |
"begin": "/(?=\\S.*/)", |
| 354 |
"beginCaptures": { |
| 355 |
"0": { |
| 356 |
"name": "punctuation.definition.string.begin.sql" |
| 357 |
} |
| 358 |
}, |
| 359 |
"end": "/", |
| 360 |
"endCaptures": { |
| 361 |
"0": { |
| 362 |
"name": "punctuation.definition.string.end.sql" |
| 363 |
} |
| 364 |
}, |
| 365 |
"name": "string.regexp.sql", |
| 366 |
"patterns": [ |
| 367 |
{ |
| 368 |
"include": "#string_interpolation" |
| 369 |
}, |
| 370 |
{ |
| 371 |
"match": "\\\\/", |
| 372 |
"name": "constant.character.escape.slash.sql" |
| 373 |
} |
| 374 |
] |
| 375 |
}, |
| 376 |
{ |
| 377 |
"begin": "%r\\{", |
| 378 |
"beginCaptures": { |
| 379 |
"0": { |
| 380 |
"name": "punctuation.definition.string.begin.sql" |
| 381 |
} |
| 382 |
}, |
| 383 |
"comment": "We should probably handle nested bracket pairs!?! -- Allan", |
| 384 |
"end": "\\}", |
| 385 |
"endCaptures": { |
| 386 |
"0": { |
| 387 |
"name": "punctuation.definition.string.end.sql" |
| 388 |
} |
| 389 |
}, |
| 390 |
"name": "string.regexp.modr.sql", |
| 391 |
"patterns": [ |
| 392 |
{ |
| 393 |
"include": "#string_interpolation" |
| 394 |
} |
| 395 |
] |
| 396 |
} |
| 397 |
] |
| 398 |
}, |
| 399 |
"string_escape": { |
| 400 |
"match": "\\\\.", |
| 401 |
"name": "constant.character.escape.sql" |
| 402 |
}, |
| 403 |
"string_interpolation": { |
| 404 |
"captures": { |
| 405 |
"1": { |
| 406 |
"name": "punctuation.definition.string.begin.sql" |
| 407 |
}, |
| 408 |
"3": { |
| 409 |
"name": "punctuation.definition.string.end.sql" |
| 410 |
} |
| 411 |
}, |
| 412 |
"match": "(#\\{)([^\\}]*)(\\})", |
| 413 |
"name": "string.interpolated.sql" |
| 414 |
}, |
| 415 |
"strings": { |
| 416 |
"patterns": [ |
| 417 |
{ |
| 418 |
"captures": { |
| 419 |
"2": { |
| 420 |
"name": "punctuation.definition.string.begin.sql" |
| 421 |
}, |
| 422 |
"3": { |
| 423 |
"name": "punctuation.definition.string.end.sql" |
| 424 |
} |
| 425 |
}, |
| 426 |
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", |
| 427 |
"match": "(N)?(')[^']*(')", |
| 428 |
"name": "string.quoted.single.sql" |
| 429 |
}, |
| 430 |
{ |
| 431 |
"begin": "'", |
| 432 |
"beginCaptures": { |
| 433 |
"0": { |
| 434 |
"name": "punctuation.definition.string.begin.sql" |
| 435 |
} |
| 436 |
}, |
| 437 |
"end": "'", |
| 438 |
"endCaptures": { |
| 439 |
"0": { |
| 440 |
"name": "punctuation.definition.string.end.sql" |
| 441 |
} |
| 442 |
}, |
| 443 |
"name": "string.quoted.single.sql", |
| 444 |
"patterns": [ |
| 445 |
{ |
| 446 |
"include": "#string_escape" |
| 447 |
} |
| 448 |
] |
| 449 |
}, |
| 450 |
{ |
| 451 |
"captures": { |
| 452 |
"1": { |
| 453 |
"name": "punctuation.definition.string.begin.sql" |
| 454 |
}, |
| 455 |
"2": { |
| 456 |
"name": "punctuation.definition.string.end.sql" |
| 457 |
} |
| 458 |
}, |
| 459 |
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", |
| 460 |
"match": "(`)[^`\\\\]*(`)", |
| 461 |
"name": "string.quoted.other.backtick.sql" |
| 462 |
}, |
| 463 |
{ |
| 464 |
"begin": "`", |
| 465 |
"beginCaptures": { |
| 466 |
"0": { |
| 467 |
"name": "punctuation.definition.string.begin.sql" |
| 468 |
} |
| 469 |
}, |
| 470 |
"end": "`", |
| 471 |
"endCaptures": { |
| 472 |
"0": { |
| 473 |
"name": "punctuation.definition.string.end.sql" |
| 474 |
} |
| 475 |
}, |
| 476 |
"name": "string.quoted.other.backtick.sql", |
| 477 |
"patterns": [ |
| 478 |
{ |
| 479 |
"include": "#string_escape" |
| 480 |
} |
| 481 |
] |
| 482 |
}, |
| 483 |
{ |
| 484 |
"captures": { |
| 485 |
"1": { |
| 486 |
"name": "punctuation.definition.string.begin.sql" |
| 487 |
}, |
| 488 |
"2": { |
| 489 |
"name": "punctuation.definition.string.end.sql" |
| 490 |
} |
| 491 |
}, |
| 492 |
"comment": "this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.", |
| 493 |
"match": "(\")[^\"#]*(\")", |
| 494 |
"name": "string.quoted.double.sql" |
| 495 |
}, |
| 496 |
{ |
| 497 |
"begin": "\"", |
| 498 |
"beginCaptures": { |
| 499 |
"0": { |
| 500 |
"name": "punctuation.definition.string.begin.sql" |
| 501 |
} |
| 502 |
}, |
| 503 |
"end": "\"", |
| 504 |
"endCaptures": { |
| 505 |
"0": { |
| 506 |
"name": "punctuation.definition.string.end.sql" |
| 507 |
} |
| 508 |
}, |
| 509 |
"name": "string.quoted.double.sql", |
| 510 |
"patterns": [ |
| 511 |
{ |
| 512 |
"include": "#string_interpolation" |
| 513 |
} |
| 514 |
] |
| 515 |
}, |
| 516 |
{ |
| 517 |
"begin": "%\\{", |
| 518 |
"beginCaptures": { |
| 519 |
"0": { |
| 520 |
"name": "punctuation.definition.string.begin.sql" |
| 521 |
} |
| 522 |
}, |
| 523 |
"end": "\\}", |
| 524 |
"endCaptures": { |
| 525 |
"0": { |
| 526 |
"name": "punctuation.definition.string.end.sql" |
| 527 |
} |
| 528 |
}, |
| 529 |
"name": "string.other.quoted.brackets.sql", |
| 530 |
"patterns": [ |
| 531 |
{ |
| 532 |
"include": "#string_interpolation" |
| 533 |
} |
| 534 |
] |
| 535 |
} |
| 536 |
] |
| 537 |
} |
| 538 |
} |
| 539 |
} |
| 540 |
|