Variable: sql-mode-sqlite-font-lock-keywords
sql-mode-sqlite-font-lock-keywords is a variable defined in sql.el.gz.
Value
(("^[.].*$" . font-lock-doc-face)
("\\b\\(a\\(?:bort\\|ction\\|dd\\|fter\\|l\\(?:l\\|ter\\|ways\\)\\|n\\(?:alyze\\|d\\)\\|sc?\\|ttach\\|utoincrement\\)\\|b\\(?:e\\(?:fore\\|\\(?:gi\\|twee\\)n\\)\\|y\\)\\|c\\(?:as\\(?:cade\\|[et]\\)\\|heck\\|o\\(?:l\\(?:late\\|umn\\)\\|\\(?:mmi\\|n\\(?:flic\\|strain\\)\\)t\\)\\|r\\(?:eate\\|oss\\)\\|urrent\\(?:_\\(?:date\\|time\\(?:stamp\\)?\\)\\)?\\)\\|d\\(?:atabase\\|e\\(?:f\\(?:ault\\|err\\(?:able\\|ed\\)\\)\\|lete\\|sc\\|tach\\)\\|istinct\\|o\\|rop\\)\\|e\\(?:ach\\|lse\\|nd\\|scape\\|x\\(?:c\\(?:ept\\|lu\\(?:\\(?:d\\|siv\\)e\\)\\)\\|ists\\|plain\\)\\)\\|f\\(?:ail\\|i\\(?:lter\\|rst\\)\\|o\\(?:llowing\\|r\\(?:eign\\)?\\)\\|rom\\|ull\\)\\|g\\(?:enerated\\|lob\\|roups?\\)\\|having\\|i\\(?:gnore\\|mmediate\\|n\\(?:dex\\(?:ed\\)?\\|itially\\|ner\\|s\\(?:ert\\|tead\\)\\|t\\(?:ersect\\|o\\)\\)\\|snull\\|[fns]\\)\\|join\\|key\\|l\\(?:ast\\|eft\\|i\\(?:ke\\|mit\\)\\)\\|mat\\(?:ch\\|erialized\\)\\|n\\(?:atural\\|o\\(?:t\\(?:hing\\|null\\)?\\)?\\|ulls?\\)\\|o\\(?:ffset\\|rder\\|thers\\|\\(?:ut\\|v\\)er\\|[fnr]\\)\\|p\\(?:artition\\|lan\\|r\\(?:agma\\|eceding\\|imary\\)\\)\\|query\\|r\\(?:a\\(?:\\(?:is\\|ng\\)e\\)\\|e\\(?:cursive\\|ferences\\|gexp\\|index\\|lease\\|name\\|place\\|strict\\|turning\\)\\|ight\\|o\\(?:llback\\|ws?\\)\\)\\|s\\(?:\\(?:avepoin\\|e\\(?:lec\\)?\\)t\\)\\|t\\(?:able\\|emp\\(?:orary\\)?\\|hen\\|ies\\|o\\|r\\(?:ansaction\\|igger\\)\\)\\|u\\(?:n\\(?:bounded\\|i\\(?:on\\|que\\)\\)\\|pdate\\|sing\\)\\|v\\(?:a\\(?:cuum\\|lues\\)\\|i\\(?:ew\\|rtual\\)\\)\\|w\\(?:he\\(?:n\\|re\\)\\|i\\(?:ndow\\|th\\(?:out\\)?\\)\\)\\)\\b"
. font-lock-keyword-face)
("\\b\\(b\\(?:igint\\|lob\\|oolean\\)\\|c\\(?:haracter\\|lob\\)\\|d\\(?:ate\\(?:time\\)?\\|ecimal\\|ouble\\(?: precision\\)?\\)\\|float\\|int\\(?:eger\\|[28]\\)?\\|mediumint\\|n\\(?:\\(?:ative characte\\|\\(?:var\\)?cha\\)r\\)\\|real\\|smallint\\|t\\(?:\\(?:ex\\|inyin\\)t\\)\\|u\\(?:meric\\|nsigned big int\\)\\|var\\(?:\\(?:cha\\|ying characte\\)r\\)\\)\\b"
. font-lock-type-face)
("\\b\\(->>?\\|a\\(?:bs\\|cosh?\\|sinh?\\|tan[2h]?\\|vg\\)\\|c\\(?:eil\\(?:ing\\)?\\|ha\\(?:nges\\|r\\)\\|o\\(?:alesce\\|ncat\\(?:_ws\\)?\\|sh?\\|unt\\)\\|ume_dist\\)\\|d\\(?:ate\\(?:time\\)?\\|e\\(?:grees\\|nse_rank\\)\\)\\|exp\\|f\\(?:irst_value\\|loor\\|ormat\\)\\|g\\(?:lob\\|roup_concat\\)\\|hex\\|i\\(?:f\\(?:null\\)?\\|if\\|nstr\\)\\|j\\(?:son\\(?:_\\(?:array\\(?:_length\\)?\\|e\\(?:ach\\|rror_position\\|xtract\\)\\|group_\\(?:array\\|object\\)\\|insert\\|object\\|p\\(?:atch\\|retty\\)\\|quote\\|re\\(?:\\(?:mov\\|plac\\)e\\)\\|set\\|t\\(?:\\(?:re\\|yp\\)e\\)\\|valid\\)\\|b\\(?:_\\(?:array\\|e\\(?:ach\\|xtract\\)\\|group_\\(?:array\\|object\\)\\|insert\\|object\\|patch\\|re\\(?:\\(?:mov\\|plac\\)e\\)\\|set\\|tree\\)\\)?\\)?\\|ulianday\\)\\|l\\(?:a\\(?:g\\|st_\\(?:insert_rowid\\|value\\)\\)\\|e\\(?:ad\\|ngth\\)\\|ike\\(?:l\\(?:ihood\\|y\\)\\)?\\|n\\|o\\(?:ad_extension\\|g\\(?:10\\|2\\)?\\|wer\\)\\|trim\\)\\|m\\(?:ax\\|edian\\|in\\|od\\)\\|n\\(?:t\\(?:\\(?:h_valu\\|il\\)e\\)\\|ullif\\)\\|octet_length\\|p\\(?:ercent\\(?:_rank\\|ile\\(?:_\\(?:cont\\|disc\\)\\)?\\)\\|i\\|ow\\(?:er\\)?\\|rintf\\)\\|quote\\|r\\(?:a\\(?:dians\\|n\\(?:dom\\(?:blob\\)?\\|k\\)\\)\\|eplace\\|o\\(?:und\\|w_number\\)\\|trim\\)\\|s\\(?:i\\(?:gn\\|nh?\\)\\|oundex\\|q\\(?:lite_\\(?:compileoption_\\(?:get\\|used\\)\\|offset\\|source_id\\|version\\)\\|rt\\)\\|tr\\(?:ftime\\|ing_agg\\)\\|u\\(?:bstr\\(?:ing\\)?\\|m\\)\\)\\|t\\(?:anh?\\|ime\\(?:diff\\)?\\|otal\\(?:_changes\\)?\\|r\\(?:im\\|unc\\)\\|ypeof\\)\\|u\\(?:n\\(?:hex\\|i\\(?:code\\|str\\(?:_quote\\)?\\|xepoch\\)\\|likely\\)\\|pper\\)\\|zeroblob\\)\\b"
. font-lock-builtin-face))
Documentation
SQLite SQL keywords used by font-lock.
This variable is used by sql-mode and sql-interactive-mode. The
regular expressions are created during compilation by calling the
function regexp-opt. Therefore, take a look at the source before
you define your own sql-mode-sqlite-font-lock-keywords.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defvar sql-mode-sqlite-font-lock-keywords
(eval-when-compile
(list
;; SQLite commands
'("^[.].*$" . font-lock-doc-face)
;; SQLite Keyword
;; https://sqlite.org/lang_keywords.html
(sql-font-lock-keywords-builder 'font-lock-keyword-face nil
"abort" "action" "add" "after" "all" "alter" "always" "analyze" "and" "as"
"asc" "attach" "autoincrement" "before" "begin" "between" "by" "cascade" "case"
"cast" "check" "collate" "column" "commit" "conflict" "constraint" "create"
"cross" "current" "current_date" "current_time" "current_timestamp" "database"
"default" "deferrable" "deferred" "delete" "desc" "detach" "distinct" "do"
"drop" "each" "else" "end" "escape" "except" "exclude" "exclusive" "exists"
"explain" "fail" "filter" "first" "following" "for" "foreign" "from" "full"
"generated" "glob" "group" "groups" "having" "if" "ignore" "immediate" "in"
"index" "indexed" "initially" "inner" "insert" "instead" "intersect" "into"
"is" "isnull" "join" "key" "last" "left" "like" "limit" "match" "materialized"
"natural" "no" "not" "nothing" "notnull" "null" "nulls" "of" "offset" "on" "or"
"order" "others" "outer" "over" "partition" "plan" "pragma" "preceding"
"primary" "query" "raise" "range" "recursive" "references" "regexp" "reindex"
"release" "rename" "replace" "restrict" "returning" "right" "rollback" "row"
"rows" "savepoint" "select" "set" "table" "temp" "temporary" "then" "ties" "to"
"transaction" "trigger" "unbounded" "union" "unique" "update" "using" "vacuum"
"values" "view" "virtual" "when" "where" "window" "with" "without"
)
;; SQLite Data types
;; https://sqlite.org/datatype3.html
(sql-font-lock-keywords-builder 'font-lock-type-face nil
"int" "integer" "tinyint" "smallint" "mediumint" "bigint" "unsigned big int"
"int2" "int8" "character" "varchar" "varying character" "nchar"
"native character" "nvarchar" "text" "clob" "blob" "real" "double"
"double precision" "float" "umeric" "decimal" "boolean" "date" "datetime"
)
;; SQLite Functions
(sql-font-lock-keywords-builder 'font-lock-builtin-face nil
;; Core functions
;; https://sqlite.org/lang_corefunc.html
"abs" "changes" "char" "coalesce" "concat" "concat_ws" "format" "glob" "hex"
"if" "ifnull" "iif" "instr" "last_insert_rowid" "length" "like" "like"
"likelihood" "likely" "load_extension" "load_extension" "lower" "ltrim" "ltrim"
"max" "min" "nullif" "octet_length" "printf" "quote" "random" "randomblob"
"replace" "round" "round" "rtrim" "rtrim" "sign" "soundex"
"sqlite_compileoption_get" "sqlite_compileoption_used" "sqlite_offset"
"sqlite_source_id" "sqlite_version" "substr" "substr" "substring" "substring"
"total_changes" "trim" "trim" "typeof" "unhex" "unhex" "unicode" "unistr"
"unistr_quote" "unlikely" "upper" "zeroblob"
;; Date/time functions
;; https://sqlite.org/lang_datefunc.html
"date" "time" "datetime" "julianday" "unixepoch" "strftime" "timediff"
;; Aggregate functions
;; https://sqlite.org/lang_aggfunc.html
"avg" "count" "count" "group_concat" "group_concat" "max" "median" "min"
"percentile" "percentile_cont" "percentile_disc" "string_agg" "sum" "total"
;; Window functions
;; https://sqlite.org/windowfunctions.html
"row_number" "rank" "dense_rank" "percent_rank" "cume_dist" "ntile" "lag"
"lead" "first_value" "last_value" "nth_value"
;; Math functions
;; https://sqlite.org/lang_mathfunc.html
"acos" "acosh" "asin" "asinh" "atan" "atan2" "atanh" "ceil" "ceiling" "cos"
"cosh" "degrees" "exp" "floor" "ln" "log" "log" "log10" "log2" "mod" "pi" "pow"
"power" "radians" "sin" "sinh" "sqrt" "tan" "tanh" "trunc"
;; JSON functions
;; https://sqlite.org/json1.html
"json" "jsonb" "json_array" "jsonb_array" "json_array_length"
"json_error_position" "json_extract" "jsonb_extract" "->" "->>" "json_insert"
"jsonb_insert" "json_object" "jsonb_object" "json_patch" "jsonb_patch"
"json_pretty" "json_remove" "jsonb_remove" "json_replace" "jsonb_replace"
"json_set" "jsonb_set" "json_type" "json_valid" "json_quote" "json_group_array"
"jsonb_group_array" "json_group_object" "jsonb_group_object" "json_each"
"json_tree" "jsonb_each" "jsonb_tree"
)))
"SQLite SQL keywords used by font-lock.
This variable is used by `sql-mode' and `sql-interactive-mode'. The
regular expressions are created during compilation by calling the
function `regexp-opt'. Therefore, take a look at the source before
you define your own `sql-mode-sqlite-font-lock-keywords'.")