site/node_modules/shiki/dist/langs/sql.mjs

7 lines
24 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "SQL", "name": "sql", "patterns": [{ "match": "((?<!@)@)\\b(\\w+)\\b", "name": "text.variable" }, { "match": "(\\[)[^\\]]*(\\])", "name": "text.bracketed" }, { "include": "#comments" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" }, "5": { "name": "entity.name.function.sql" } }, "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", "name": "meta.create.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.sql" } }, "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))", "name": "meta.drop.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.table.sql" }, "3": { "name": "entity.name.function.sql" }, "4": { "name": "keyword.other.cascade.sql" } }, "match": "(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)", "name": "meta.drop.sql" }, { "captures": { "1": { "name": "keyword.other.create.sql" }, "2": { "name": "keyword.other.table.sql" } }, "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+)", "name": "meta.alter.sql" }, { "captures": { "1": { "name": "storage.type.sql" }, "2": { "name": "storage.type.sql" }, "3": { "name": "constant.numeric.sql" }, "4": { "name": "storage.type.sql" }, "5": { "name": "constant.numeric.sql" }, "6": { "name": "storage.type.sql" }, "7": { "name": "constant.numeric.sql" }, "8": { "name": "constant.numeric.sql" }, "9": { "name": "storage.type.sql" }, "10": { "name": "constant.numeric.sql" }, "11": { "name": "storage.type.sql" }, "12": { "name": "storage.type.sql" }, "13": { "name": "storage.type.sql" }, "14": { "name": "constant.numeric.sql" }, "15": { "name": "storage.type.sql" } }, "match": "(?xi)\n\n\n\\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\n|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\n|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\n|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\n|\\b(times?)\\b(?:\\((\\d+)\\))?(\\swith(?:out)?\\stime\\szone\\b)?\n\n\n|\\b(timestamp)(?:(s|tz))?\\b(?:\\((\\d+)\\))?(\\s(with|without)\\stime\\szone\\b)?\n\n" }, { "match": "(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|nocheck|check|constraint|collate|default)\\b)", "name": "storage.modifier.sql" }, { "match": "\\b\\d+\\b", "name": "constant.numeric.sql" }, { "match": "(?i:\\b(select(\\s+(all|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|cross\\s+join|join|straight_join|(inner|(left|right|full)(\\s+outer)?)\\s+join|natural(\\s+(inner|(left|right|full)(\\s+outer)?))?\\s+join)\\b)", "name": "keyword.other.DML.sql" }, { "match": "(?i:\\b(on|off|((is\\s+)?not\\s+)?null)\\b)", "name": "keyword.other.DDL.create.II.sql" }, { "match": "(?i:\\bvalues\\b)", "name": "keyword.other.DML.II.sql" }, { "match": "(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)", "name": "keyword.other.LUW.sql" }, { "match": "(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)", "name": "keyword.other.authorization.sql" }, { "match": "(?i:\\bin\\b)", "name": "keyword.other.data-integrity.sql" }, { "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+)", "name": "keyword.other.object-comments.sql" }, { "match": "(?i)\\bAS\\b
var sql = [
lang
];
export { sql as default };