; SQL highlighting

; Keywords
[
  "SELECT" "FROM" "WHERE" "AND" "OR" "NOT" "IN" "IS" "NULL"
  "INSERT" "INTO" "VALUES" "UPDATE" "SET" "DELETE"
  "CREATE" "TABLE" "INDEX" "VIEW" "DROP" "ALTER" "ADD"
  "JOIN" "LEFT" "RIGHT" "INNER" "OUTER" "FULL" "CROSS" "ON"
  "GROUP" "BY" "ORDER" "ASC" "DESC" "HAVING" "LIMIT" "OFFSET"
  "UNION" "ALL" "DISTINCT" "AS" "LIKE" "BETWEEN" "EXISTS"
  "CASE" "WHEN" "THEN" "ELSE" "END"
  "BEGIN" "COMMIT" "ROLLBACK" "TRANSACTION"
  "PRIMARY" "KEY" "FOREIGN" "REFERENCES" "UNIQUE" "CHECK" "DEFAULT"
  "CONSTRAINT" "CASCADE" "RESTRICT"
  "DATABASE" "SCHEMA" "GRANT" "REVOKE" "TO" "WITH"
  "select" "from" "where" "and" "or" "not" "in" "is" "null"
  "insert" "into" "values" "update" "set" "delete"
  "create" "table" "index" "view" "drop" "alter" "add"
  "join" "left" "right" "inner" "outer" "full" "cross" "on"
  "group" "by" "order" "asc" "desc" "having" "limit" "offset"
  "union" "all" "distinct" "as" "like" "between" "exists"
  "case" "when" "then" "else" "end"
  "begin" "commit" "rollback" "transaction"
  "primary" "key" "foreign" "references" "unique" "check" "default"
  "constraint" "cascade" "restrict"
  "database" "schema" "grant" "revoke" "to" "with"
] @keyword

; Types
[
  "INT" "INTEGER" "SMALLINT" "BIGINT" "DECIMAL" "NUMERIC"
  "FLOAT" "REAL" "DOUBLE" "PRECISION"
  "CHAR" "VARCHAR" "TEXT" "CLOB" "BLOB"
  "DATE" "TIME" "TIMESTAMP" "DATETIME"
  "BOOLEAN" "BOOL"
  "int" "integer" "smallint" "bigint" "decimal" "numeric"
  "float" "real" "double" "precision"
  "char" "varchar" "text" "clob" "blob"
  "date" "time" "timestamp" "datetime"
  "boolean" "bool"
] @type

; Functions
(function_call name: (identifier) @function)
(invocation name: (identifier) @function)

; Strings
(string) @string
(literal) @string

; Numbers
(number) @number

; Comments
(comment) @comment
(marginalia) @comment

; Identifiers
(identifier) @variable
(column_reference) @property
(table_reference) @type
