diff options
Diffstat (limited to 'js/highlight/sql.js.map')
-rw-r--r-- | js/highlight/sql.js.map | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/highlight/sql.js.map b/js/highlight/sql.js.map index 6c2504540..acce99d10 100644 --- a/js/highlight/sql.js.map +++ b/js/highlight/sql.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/sql.js"],"names":["module","exports","hljs","COMMENT_MODE","COMMENT","name","case_insensitive","illegal","contains","beginKeywords","end","endsWithParent","keywords","$pattern","keyword","literal","built_in","className","begin","C_NUMBER_MODE","C_BLOCK_COMMENT_MODE","HASH_COMMENT_MODE"],"mappings":"oGAyKAA,EAAOC,QAlKP,SAAaC,GACX,IAAIC,EAAeD,EAAKE,QAAQ,KAAM,KACtC,MAAO,CACLC,KAAM,MACNC,kBAAkB,EAClBC,QAAS,UACTC,SAAU,CACR,CACEC,cACE,gYAKFC,IAAK,IAAKC,gBAAgB,EAC1BC,SAAU,CACRC,SAAU,UACVC,QACE,uyVA8GFC,QACE,0BACFC,SACE,0NAGJR,SAAU,CACR,CACES,UAAW,SACXC,MAAO,IAAMR,IAAK,IAClBF,SAAU,CAAC,CAACU,MAAO,QAErB,CACED,UAAW,SACXC,MAAO,IAAKR,IAAK,IACjBF,SAAU,CAAC,CAACU,MAAO,QAErB,CACED,UAAW,SACXC,MAAO,IAAKR,IAAK,KAEnBR,EAAKiB,cACLjB,EAAKkB,qBACLjB,EACAD,EAAKmB,oBAGTnB,EAAKkB,qBACLjB,EACAD,EAAKmB","file":"highlight/sql.js?v=666b825685bae8655e6b","sourcesContent":["/*\n Language: SQL\n Contributors: Nikolay Lisienko <info@neor.ru>, Heiko August <post@auge8472.de>, Travis Odom <travis.a.odom@gmail.com>, Vadimtro <vadimtro@yahoo.com>, Benjamin Auder <benjamin.auder@gmail.com>\n Website: https://en.wikipedia.org/wiki/SQL\n Category: common\n */\n\nfunction sql(hljs) {\n var COMMENT_MODE = hljs.COMMENT('--', '$');\n return {\n name: 'SQL',\n case_insensitive: true,\n illegal: /[<>{}*]/,\n contains: [\n {\n beginKeywords:\n 'begin end start commit rollback savepoint lock alter create drop rename call ' +\n 'delete do handler insert load replace select truncate update set show pragma grant ' +\n 'merge describe use explain help declare prepare execute deallocate release ' +\n 'unlock purge reset change stop analyze cache flush optimize repair kill ' +\n 'install uninstall checksum restore check backup revoke comment values with',\n end: /;/, endsWithParent: true,\n keywords: {\n $pattern: /[\\w\\.]+/,\n keyword:\n 'as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add ' +\n 'addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias ' +\n 'all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply ' +\n 'archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan ' +\n 'atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid ' +\n 'authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile ' +\n 'before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float ' +\n 'binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound ' +\n 'bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel ' +\n 'capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base ' +\n 'char_length character_length characters characterset charindex charset charsetform charsetid check ' +\n 'checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close ' +\n 'cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation ' +\n 'collect colu colum column column_value columns columns_updated comment commit compact compatibility ' +\n 'compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn ' +\n 'connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection ' +\n 'consider consistent constant constraint constraints constructor container content contents context ' +\n 'contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost ' +\n 'count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation ' +\n 'critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user ' +\n 'cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add ' +\n 'date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts ' +\n 'day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate ' +\n 'declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults ' +\n 'deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank ' +\n 'depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor ' +\n 'deterministic diagnostics difference dimension direct_load directory disable disable_all ' +\n 'disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div ' +\n 'do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable ' +\n 'editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt ' +\n 'end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors ' +\n 'escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding ' +\n 'execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external ' +\n 'external_1 external_2 externally extract failed failed_login_attempts failover failure far fast ' +\n 'feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final ' +\n 'finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign ' +\n 'form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ' +\n 'ftp full function general generated get get_format get_lock getdate getutcdate global global_name ' +\n 'globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups ' +\n 'gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex ' +\n 'hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified ' +\n 'identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment ' +\n 'index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile ' +\n 'initial initialized initially initrans inmemory inner innodb input insert install instance instantiable ' +\n 'instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat ' +\n 'is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists ' +\n 'keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase ' +\n 'lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit ' +\n 'lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate ' +\n 'locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call ' +\n 'logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime ' +\n 'managed management manual map mapping mask master master_pos_wait match matched materialized max ' +\n 'maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans ' +\n 'md5 measures median medium member memcompress memory merge microsecond mid migration min minextents ' +\n 'minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month ' +\n 'months mount move movement multiset mutex name name_const names nan national native natural nav nchar ' +\n 'nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile ' +\n 'nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile ' +\n 'nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder ' +\n 'nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck ' +\n 'noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe ' +\n 'nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ' +\n 'ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old ' +\n 'on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date ' +\n 'oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary ' +\n 'out outer outfile outline output over overflow overriding package pad parallel parallel_enable ' +\n 'parameters parent parse partial partition partitions pascal passing password password_grace_time ' +\n 'password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex ' +\n 'pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc ' +\n 'performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin ' +\n 'policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction ' +\n 'prediction_cost prediction_details prediction_probability prediction_set prepare present preserve ' +\n 'prior priority private private_sga privileges procedural procedure procedure_analyze processlist ' +\n 'profiles project prompt protection public publishingservername purge quarter query quick quiesce quota ' +\n 'quotename radians raise rand range rank raw read reads readsize rebuild record records ' +\n 'recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh ' +\n 'regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy ' +\n 'reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename ' +\n 'repair repeat replace replicate replication required reset resetlogs resize resource respect restore ' +\n 'restricted result result_cache resumable resume retention return returning returns reuse reverse revoke ' +\n 'right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows ' +\n 'rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll ' +\n 'sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select ' +\n 'self semi sequence sequential serializable server servererror session session_user sessions_per_user set ' +\n 'sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor ' +\n 'si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin ' +\n 'size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex ' +\n 'source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows ' +\n 'sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone ' +\n 'standby start starting startup statement static statistics stats_binomial_test stats_crosstab ' +\n 'stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep ' +\n 'stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev ' +\n 'stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate ' +\n 'subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum ' +\n 'suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate ' +\n 'sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo ' +\n 'template temporary terminated tertiary_weights test than then thread through tier ties time time_format ' +\n 'time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr ' +\n 'timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking ' +\n 'transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate ' +\n 'try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress ' +\n 'under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot ' +\n 'unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert ' +\n 'url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date ' +\n 'utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var ' +\n 'var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray ' +\n 'verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear ' +\n 'wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped ' +\n 'xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces ' +\n 'xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek',\n literal:\n 'true false null unknown',\n built_in:\n 'array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number ' +\n 'numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void'\n },\n contains: [\n {\n className: 'string',\n begin: '\\'', end: '\\'',\n contains: [{begin: '\\'\\''}]\n },\n {\n className: 'string',\n begin: '\"', end: '\"',\n contains: [{begin: '\"\"'}]\n },\n {\n className: 'string',\n begin: '`', end: '`'\n },\n hljs.C_NUMBER_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n hljs.HASH_COMMENT_MODE\n ]\n },\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n hljs.HASH_COMMENT_MODE\n ]\n };\n}\n\nmodule.exports = sql;\n"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/sql.js"],"names":["source","re","concat","args","joined","map","x","join","either","module","exports","hljs","COMMENT_MODE","COMMENT","LITERALS","TYPES","RESERVED_FUNCTIONS","COMBOS","FUNCTIONS","KEYWORDS","filter","keyword","includes","FUNCTION_CALL","begin","keywords","built_in","name","case_insensitive","illegal","$pattern","list","exceptions","when","qualifyFn","item","match","reduceRelevancy","length","literal","type","contains","className","variants","end","C_NUMBER_MODE","C_BLOCK_COMMENT_MODE","relevance"],"mappings":"oGASA,SAASA,EAAOC,GACd,OAAKA,EACa,iBAAPA,EAAwBA,EAE5BA,EAAGD,OAHM,KAUlB,SAASE,IAAgB,2BAANC,EAAM,yBAANA,EAAM,gBACvB,IAAMC,EAASD,EAAKE,KAAI,SAACC,GAAD,OAAON,EAAOM,MAAIC,KAAK,IAC/C,OAAOH,EAUT,SAASI,IAAgB,2BAANL,EAAM,yBAANA,EAAM,gBACvB,IAAMC,EAAS,IAAMD,EAAKE,KAAI,SAACC,GAAD,OAAON,EAAOM,MAAIC,KAAK,KAAO,IAC5D,OAAOH,EAwpBTK,EAAOC,QA/oBP,SAAaC,GACX,IAAMC,EAAeD,EAAKE,QAAQ,KAAM,KAmBlCC,EAAW,CACf,OACA,QAGA,WAUIC,EAAQ,CACZ,SACA,SACA,OACA,UACA,OACA,YACA,OACA,OACA,MACA,WACA,UACA,QACA,MACA,UACA,WACA,QACA,QACA,WACA,UACA,OACA,MACA,WACA,OACA,YACA,UACA,UACA,aAmYIC,EAAqB,CACzB,MACA,OACA,YACA,OACA,OACA,MACA,OACA,OACA,UACA,WACA,OACA,MACA,OACA,QACA,YACA,aACA,YACA,aACA,QACA,UACA,MACA,UACA,cACA,QACA,aACA,gBACA,cACA,cACA,iBACA,aACA,aACA,uBACA,aACA,MACA,aACA,OACA,UACA,KACA,MACA,QACA,QACA,MACA,MACA,MACA,YACA,QACA,SACA,eACA,kBACA,kBACA,WACA,iBACA,QACA,OACA,YACA,YACA,aACA,iBACA,UACA,aACA,WACA,WACA,WACA,aACA,MACA,OACA,OACA,aACA,cACA,YACA,kBACA,MACA,MACA,OACA,YACA,kBACA,QACA,OACA,aACA,SACA,QACA,WACA,UACA,WACA,gBAwBIC,EAAS,CACb,eACA,cACA,cACA,cACA,WACA,cACA,iBACA,gBACA,cACA,gBACA,gBACA,eACA,cACA,aACA,cACA,iBAGIC,EAAYF,EAEZG,EAAW,UAtfM,CACrB,MACA,OACA,MACA,WACA,QACA,MACA,MACA,MACA,QACA,YACA,wBACA,KACA,aACA,OACA,aACA,KACA,OACA,SACA,gBACA,MACA,QACA,cACA,kBACA,UACA,SACA,SACA,OACA,UACA,OACA,KACA,OACA,SACA,cACA,WACA,OACA,OACA,OACA,UACA,OACA,cACA,YACA,mBACA,QACA,aACA,OACA,QACA,WACA,UACA,UACA,SACA,SACA,YACA,UACA,aACA,WACA,UACA,OACA,OACA,gBACA,MACA,OACA,QACA,YACA,aACA,SACA,QACA,OACA,YACA,UACA,kBACA,eACA,kCACA,eACA,eACA,cACA,iBACA,eACA,oBACA,eACA,eACA,mCACA,eACA,SACA,QACA,OACA,MACA,aACA,MACA,UACA,WACA,UACA,UACA,SACA,SACA,aACA,QACA,WACA,gBACA,aACA,WACA,SACA,OACA,UACA,OACA,UACA,OACA,QACA,MACA,YACA,gBACA,WACA,SACA,SACA,QACA,SACA,OACA,UACA,SACA,MACA,WACA,UACA,QACA,QACA,SACA,cACA,QACA,QACA,MACA,UACA,YACA,OACA,OACA,OACA,WACA,SACA,MACA,SACA,QACA,QACA,WACA,SACA,SACA,OACA,OACA,WACA,KACA,YACA,UACA,QACA,QACA,cACA,SACA,MACA,UACA,YACA,eACA,WACA,OACA,KACA,OACA,aACA,gBACA,cACA,cACA,iBACA,aACA,aACA,uBACA,aACA,MACA,WACA,QACA,aACA,UACA,OACA,UACA,OACA,OACA,aACA,UACA,KACA,QACA,YACA,iBACA,MACA,QACA,QACA,QACA,eACA,kBACA,UACA,MACA,SACA,QACA,SACA,MACA,SACA,MACA,WACA,SACA,QACA,WACA,WACA,UACA,QACA,QACA,MACA,KACA,OACA,YACA,MACA,YACA,QACA,OACA,SACA,UACA,eACA,oBACA,KACA,SACA,MACA,OACA,KACA,MACA,OACA,OACA,KACA,QACA,MACA,QACA,OACA,WACA,UACA,YACA,YACA,UACA,MACA,UACA,eACA,kBACA,kBACA,SACA,UACA,WACA,iBACA,QACA,WACA,YACA,UACA,UACA,YACA,MACA,QACA,OACA,QACA,OACA,YACA,MACA,aACA,cACA,YACA,YACA,aACA,iBACA,UACA,aACA,WACA,WACA,WACA,UACA,SACA,SACA,UACA,SACA,QACA,WACA,SACA,MACA,aACA,OACA,UACA,YACA,QACA,SACA,SACA,SACA,OACA,SACA,YACA,eACA,MACA,OACA,UACA,MACA,OACA,OACA,WACA,OACA,WACA,eACA,MACA,eACA,WACA,aACA,OACA,QACA,SACA,aACA,cACA,cACA,SACA,YACA,kBACA,WACA,MACA,YACA,SACA,cACA,cACA,QACA,cACA,MACA,OACA,OACA,OACA,YACA,gBACA,kBACA,KACA,WACA,YACA,kBACA,cACA,QACA,UACA,OACA,aACA,OACA,WACA,UACA,QACA,SACA,UACA,SACA,YACA,QACA,OACA,QACA,QACA,SACA,WACA,UACA,WACA,YACA,UACA,UACA,aACA,OACA,WACA,QACA,eACA,SACA,OACA,SACA,UACA,QA1XyB,CACzB,MACA,MACA,YACA,OACA,QACA,QACA,OACA,SA0f0DC,QAAO,SAACC,GAClE,OAAQL,EAAmBM,SAASD,MAchCE,EAAgB,CACpBC,MAAOtB,EAAO,KAAMM,EAAM,WAAN,EAAUU,GAAY,SAC1CO,SAAU,CACRC,SAAUR,IAmBd,MAAO,CACLS,KAAM,MACNC,kBAAkB,EAElBC,QAAS,WACTJ,SAAU,CACRK,SAAU,YACVT,QArBJ,SAAyBU,GAA+B,6DAAJ,GAApBC,EAAwB,EAAxBA,WAAYC,EAAY,EAAZA,KACpCC,EAAYD,EAElB,OADAD,EAAaA,GAAc,GACpBD,EAAK1B,KAAI,SAAC8B,GACf,OAAIA,EAAKC,MAAM,WAAaJ,EAAWV,SAASa,GACvCA,EACED,EAAUC,GACnB,UAAUA,EAAV,MAEOA,KAaPE,CAAgBlB,EAAU,CAAEc,KAAM,SAAC3B,GAAD,OAAOA,EAAEgC,OAAS,KACtDC,QAASzB,EACT0B,KAAMzB,EACNW,SAzF4B,CAC9B,kBACA,eACA,kCACA,eACA,eACA,iBACA,mCACA,eACA,eACA,cACA,cACA,eACA,YACA,oBACA,mBA4EAe,SAAU,CACR,CACEjB,MAAOhB,EAAM,WAAN,EAAUS,GACjBQ,SAAU,CACRK,SAAU,UACVT,QAASF,EAASjB,OAAOe,GACzBsB,QAASzB,EACT0B,KAAMzB,IAGV,CACE2B,UAAW,OACXlB,MAAOhB,EAAM,WAAN,EArmBY,CACvB,mBACA,eACA,gBACA,sBAmmBEe,EA5Da,CACfmB,UAAW,WACXlB,MAAO,cAvkBM,CACbkB,UAAW,SACXC,SAAU,CACR,CACEnB,MAAO,IACPoB,IAAK,IACLH,SAAU,CACR,CAACjB,MAAO,UAKU,CACxBA,MAAO,IACPoB,IAAK,IACLH,SAAU,CAAE,CAAEjB,MAAO,QAsnBnBb,EAAKkC,cACLlC,EAAKmC,qBACLlC,EA7Da,CACf8B,UAAW,WACXlB,MAAO,gDACPuB,UAAW","file":"highlight/sql.js?v=9b59e603ae5a4de23fde","sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/*\n Language: SQL\n Website: https://en.wikipedia.org/wiki/SQL\n Category: common, database\n */\n\nfunction sql(hljs) {\n const COMMENT_MODE = hljs.COMMENT('--', '$');\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: /'/,\n end: /'/,\n contains: [\n {begin: /''/ }\n ]\n }\n ]\n };\n const QUOTED_IDENTIFIER = {\n begin: /\"/,\n end: /\"/,\n contains: [ { begin: /\"\"/ } ]\n };\n\n const LITERALS = [\n \"true\",\n \"false\",\n // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way.\n // \"null\",\n \"unknown\"\n ];\n\n const MULTI_WORD_TYPES = [\n \"double precision\",\n \"large object\",\n \"with timezone\",\n \"without timezone\"\n ];\n\n const TYPES = [\n 'bigint',\n 'binary',\n 'blob',\n 'boolean',\n 'char',\n 'character',\n 'clob',\n 'date',\n 'dec',\n 'decfloat',\n 'decimal',\n 'float',\n 'int',\n 'integer',\n 'interval',\n 'nchar',\n 'nclob',\n 'national',\n 'numeric',\n 'real',\n 'row',\n 'smallint',\n 'time',\n 'timestamp',\n 'varchar',\n 'varying', // modifier (character varying)\n 'varbinary'\n ];\n\n const NON_RESERVED_WORDS = [\n \"add\",\n \"asc\",\n \"collation\",\n \"desc\",\n \"final\",\n \"first\",\n \"last\",\n \"view\"\n ];\n\n // https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#reserved-word\n const RESERVED_WORDS = [\n \"abs\",\n \"acos\",\n \"all\",\n \"allocate\",\n \"alter\",\n \"and\",\n \"any\",\n \"are\",\n \"array\",\n \"array_agg\",\n \"array_max_cardinality\",\n \"as\",\n \"asensitive\",\n \"asin\",\n \"asymmetric\",\n \"at\",\n \"atan\",\n \"atomic\",\n \"authorization\",\n \"avg\",\n \"begin\",\n \"begin_frame\",\n \"begin_partition\",\n \"between\",\n \"bigint\",\n \"binary\",\n \"blob\",\n \"boolean\",\n \"both\",\n \"by\",\n \"call\",\n \"called\",\n \"cardinality\",\n \"cascaded\",\n \"case\",\n \"cast\",\n \"ceil\",\n \"ceiling\",\n \"char\",\n \"char_length\",\n \"character\",\n \"character_length\",\n \"check\",\n \"classifier\",\n \"clob\",\n \"close\",\n \"coalesce\",\n \"collate\",\n \"collect\",\n \"column\",\n \"commit\",\n \"condition\",\n \"connect\",\n \"constraint\",\n \"contains\",\n \"convert\",\n \"copy\",\n \"corr\",\n \"corresponding\",\n \"cos\",\n \"cosh\",\n \"count\",\n \"covar_pop\",\n \"covar_samp\",\n \"create\",\n \"cross\",\n \"cube\",\n \"cume_dist\",\n \"current\",\n \"current_catalog\",\n \"current_date\",\n \"current_default_transform_group\",\n \"current_path\",\n \"current_role\",\n \"current_row\",\n \"current_schema\",\n \"current_time\",\n \"current_timestamp\",\n \"current_path\",\n \"current_role\",\n \"current_transform_group_for_type\",\n \"current_user\",\n \"cursor\",\n \"cycle\",\n \"date\",\n \"day\",\n \"deallocate\",\n \"dec\",\n \"decimal\",\n \"decfloat\",\n \"declare\",\n \"default\",\n \"define\",\n \"delete\",\n \"dense_rank\",\n \"deref\",\n \"describe\",\n \"deterministic\",\n \"disconnect\",\n \"distinct\",\n \"double\",\n \"drop\",\n \"dynamic\",\n \"each\",\n \"element\",\n \"else\",\n \"empty\",\n \"end\",\n \"end_frame\",\n \"end_partition\",\n \"end-exec\",\n \"equals\",\n \"escape\",\n \"every\",\n \"except\",\n \"exec\",\n \"execute\",\n \"exists\",\n \"exp\",\n \"external\",\n \"extract\",\n \"false\",\n \"fetch\",\n \"filter\",\n \"first_value\",\n \"float\",\n \"floor\",\n \"for\",\n \"foreign\",\n \"frame_row\",\n \"free\",\n \"from\",\n \"full\",\n \"function\",\n \"fusion\",\n \"get\",\n \"global\",\n \"grant\",\n \"group\",\n \"grouping\",\n \"groups\",\n \"having\",\n \"hold\",\n \"hour\",\n \"identity\",\n \"in\",\n \"indicator\",\n \"initial\",\n \"inner\",\n \"inout\",\n \"insensitive\",\n \"insert\",\n \"int\",\n \"integer\",\n \"intersect\",\n \"intersection\",\n \"interval\",\n \"into\",\n \"is\",\n \"join\",\n \"json_array\",\n \"json_arrayagg\",\n \"json_exists\",\n \"json_object\",\n \"json_objectagg\",\n \"json_query\",\n \"json_table\",\n \"json_table_primitive\",\n \"json_value\",\n \"lag\",\n \"language\",\n \"large\",\n \"last_value\",\n \"lateral\",\n \"lead\",\n \"leading\",\n \"left\",\n \"like\",\n \"like_regex\",\n \"listagg\",\n \"ln\",\n \"local\",\n \"localtime\",\n \"localtimestamp\",\n \"log\",\n \"log10\",\n \"lower\",\n \"match\",\n \"match_number\",\n \"match_recognize\",\n \"matches\",\n \"max\",\n \"member\",\n \"merge\",\n \"method\",\n \"min\",\n \"minute\",\n \"mod\",\n \"modifies\",\n \"module\",\n \"month\",\n \"multiset\",\n \"national\",\n \"natural\",\n \"nchar\",\n \"nclob\",\n \"new\",\n \"no\",\n \"none\",\n \"normalize\",\n \"not\",\n \"nth_value\",\n \"ntile\",\n \"null\",\n \"nullif\",\n \"numeric\",\n \"octet_length\",\n \"occurrences_regex\",\n \"of\",\n \"offset\",\n \"old\",\n \"omit\",\n \"on\",\n \"one\",\n \"only\",\n \"open\",\n \"or\",\n \"order\",\n \"out\",\n \"outer\",\n \"over\",\n \"overlaps\",\n \"overlay\",\n \"parameter\",\n \"partition\",\n \"pattern\",\n \"per\",\n \"percent\",\n \"percent_rank\",\n \"percentile_cont\",\n \"percentile_disc\",\n \"period\",\n \"portion\",\n \"position\",\n \"position_regex\",\n \"power\",\n \"precedes\",\n \"precision\",\n \"prepare\",\n \"primary\",\n \"procedure\",\n \"ptf\",\n \"range\",\n \"rank\",\n \"reads\",\n \"real\",\n \"recursive\",\n \"ref\",\n \"references\",\n \"referencing\",\n \"regr_avgx\",\n \"regr_avgy\",\n \"regr_count\",\n \"regr_intercept\",\n \"regr_r2\",\n \"regr_slope\",\n \"regr_sxx\",\n \"regr_sxy\",\n \"regr_syy\",\n \"release\",\n \"result\",\n \"return\",\n \"returns\",\n \"revoke\",\n \"right\",\n \"rollback\",\n \"rollup\",\n \"row\",\n \"row_number\",\n \"rows\",\n \"running\",\n \"savepoint\",\n \"scope\",\n \"scroll\",\n \"search\",\n \"second\",\n \"seek\",\n \"select\",\n \"sensitive\",\n \"session_user\",\n \"set\",\n \"show\",\n \"similar\",\n \"sin\",\n \"sinh\",\n \"skip\",\n \"smallint\",\n \"some\",\n \"specific\",\n \"specifictype\",\n \"sql\",\n \"sqlexception\",\n \"sqlstate\",\n \"sqlwarning\",\n \"sqrt\",\n \"start\",\n \"static\",\n \"stddev_pop\",\n \"stddev_samp\",\n \"submultiset\",\n \"subset\",\n \"substring\",\n \"substring_regex\",\n \"succeeds\",\n \"sum\",\n \"symmetric\",\n \"system\",\n \"system_time\",\n \"system_user\",\n \"table\",\n \"tablesample\",\n \"tan\",\n \"tanh\",\n \"then\",\n \"time\",\n \"timestamp\",\n \"timezone_hour\",\n \"timezone_minute\",\n \"to\",\n \"trailing\",\n \"translate\",\n \"translate_regex\",\n \"translation\",\n \"treat\",\n \"trigger\",\n \"trim\",\n \"trim_array\",\n \"true\",\n \"truncate\",\n \"uescape\",\n \"union\",\n \"unique\",\n \"unknown\",\n \"unnest\",\n \"update \",\n \"upper\",\n \"user\",\n \"using\",\n \"value\",\n \"values\",\n \"value_of\",\n \"var_pop\",\n \"var_samp\",\n \"varbinary\",\n \"varchar\",\n \"varying\",\n \"versioning\",\n \"when\",\n \"whenever\",\n \"where\",\n \"width_bucket\",\n \"window\",\n \"with\",\n \"within\",\n \"without\",\n \"year\",\n ];\n\n // these are reserved words we have identified to be functions\n // and should only be highlighted in a dispatch-like context\n // ie, array_agg(...), etc.\n const RESERVED_FUNCTIONS = [\n \"abs\",\n \"acos\",\n \"array_agg\",\n \"asin\",\n \"atan\",\n \"avg\",\n \"cast\",\n \"ceil\",\n \"ceiling\",\n \"coalesce\",\n \"corr\",\n \"cos\",\n \"cosh\",\n \"count\",\n \"covar_pop\",\n \"covar_samp\",\n \"cume_dist\",\n \"dense_rank\",\n \"deref\",\n \"element\",\n \"exp\",\n \"extract\",\n \"first_value\",\n \"floor\",\n \"json_array\",\n \"json_arrayagg\",\n \"json_exists\",\n \"json_object\",\n \"json_objectagg\",\n \"json_query\",\n \"json_table\",\n \"json_table_primitive\",\n \"json_value\",\n \"lag\",\n \"last_value\",\n \"lead\",\n \"listagg\",\n \"ln\",\n \"log\",\n \"log10\",\n \"lower\",\n \"max\",\n \"min\",\n \"mod\",\n \"nth_value\",\n \"ntile\",\n \"nullif\",\n \"percent_rank\",\n \"percentile_cont\",\n \"percentile_disc\",\n \"position\",\n \"position_regex\",\n \"power\",\n \"rank\",\n \"regr_avgx\",\n \"regr_avgy\",\n \"regr_count\",\n \"regr_intercept\",\n \"regr_r2\",\n \"regr_slope\",\n \"regr_sxx\",\n \"regr_sxy\",\n \"regr_syy\",\n \"row_number\",\n \"sin\",\n \"sinh\",\n \"sqrt\",\n \"stddev_pop\",\n \"stddev_samp\",\n \"substring\",\n \"substring_regex\",\n \"sum\",\n \"tan\",\n \"tanh\",\n \"translate\",\n \"translate_regex\",\n \"treat\",\n \"trim\",\n \"trim_array\",\n \"unnest\",\n \"upper\",\n \"value_of\",\n \"var_pop\",\n \"var_samp\",\n \"width_bucket\",\n ];\n\n // these functions can\n const POSSIBLE_WITHOUT_PARENS = [\n \"current_catalog\",\n \"current_date\",\n \"current_default_transform_group\",\n \"current_path\",\n \"current_role\",\n \"current_schema\",\n \"current_transform_group_for_type\",\n \"current_user\",\n \"session_user\",\n \"system_time\",\n \"system_user\",\n \"current_time\",\n \"localtime\",\n \"current_timestamp\",\n \"localtimestamp\"\n ];\n\n // those exist to boost relevance making these very\n // \"SQL like\" keyword combos worth +1 extra relevance\n const COMBOS = [\n \"create table\",\n \"insert into\",\n \"primary key\",\n \"foreign key\",\n \"not null\",\n \"alter table\",\n \"add constraint\",\n \"grouping sets\",\n \"on overflow\",\n \"character set\",\n \"respect nulls\",\n \"ignore nulls\",\n \"nulls first\",\n \"nulls last\",\n \"depth first\",\n \"breadth first\"\n ];\n\n const FUNCTIONS = RESERVED_FUNCTIONS;\n\n const KEYWORDS = [...RESERVED_WORDS, ...NON_RESERVED_WORDS].filter((keyword) => {\n return !RESERVED_FUNCTIONS.includes(keyword);\n });\n\n const VARIABLE = {\n className: \"variable\",\n begin: /@[a-z0-9]+/,\n };\n\n const OPERATOR = {\n className: \"operator\",\n begin: /[-+*/=%^~]|&&?|\\|\\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,\n relevance: 0,\n };\n\n const FUNCTION_CALL = {\n begin: concat(/\\b/, either(...FUNCTIONS), /\\s*\\(/),\n keywords: {\n built_in: FUNCTIONS\n }\n };\n\n // keywords with less than 3 letters are reduced in relevancy\n function reduceRelevancy(list, {exceptions, when} = {}) {\n const qualifyFn = when;\n exceptions = exceptions || [];\n return list.map((item) => {\n if (item.match(/\\|\\d+$/) || exceptions.includes(item)) {\n return item;\n } else if (qualifyFn(item)) {\n return `${item}|0`;\n } else {\n return item;\n }\n });\n }\n\n return {\n name: 'SQL',\n case_insensitive: true,\n // does not include {} or HTML tags `</`\n illegal: /[{}]|<\\//,\n keywords: {\n $pattern: /\\b[\\w\\.]+/,\n keyword:\n reduceRelevancy(KEYWORDS, { when: (x) => x.length < 3 }),\n literal: LITERALS,\n type: TYPES,\n built_in: POSSIBLE_WITHOUT_PARENS\n },\n contains: [\n {\n begin: either(...COMBOS),\n keywords: {\n $pattern: /[\\w\\.]+/,\n keyword: KEYWORDS.concat(COMBOS),\n literal: LITERALS,\n type: TYPES\n },\n },\n {\n className: \"type\",\n begin: either(...MULTI_WORD_TYPES)\n },\n FUNCTION_CALL,\n VARIABLE,\n STRING,\n QUOTED_IDENTIFIER,\n hljs.C_NUMBER_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n COMMENT_MODE,\n OPERATOR\n ]\n };\n}\n\nmodule.exports = sql;\n"],"sourceRoot":""}
\ No newline at end of file |