1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-21 16:15:40 +01:00
nanorc/sql.nanorc
ThomasR bba53c3940 Rename syntax definitions
Duplicate syntax definition names may cause problems.
Since nano comes with predefined all-lowercase syntax definitions,
we use uppercase letters everywhere to reduce the risk of future conflicts
2016-03-02 20:51:19 +01:00

35 lines
1.9 KiB
Plaintext

syntax "SQL" "\.sql$" "sqliterc$"
icolor cyan "\<(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\>"
icolor cyan "\<(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\>"
icolor cyan "\<(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\>"
icolor cyan "\<(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\>"
icolor cyan "\<(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\>"
icolor cyan "\<(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\>"
icolor cyan "\<(GROUP|GRANT|HAVING)\>"
icolor cyan "\<(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\>"
icolor cyan "\<(JOIN|KEYS|KILL|KEY)\>"
icolor cyan "\<(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\>"
icolor cyan "\<(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\>"
icolor cyan "\<(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\>"
icolor cyan "\<(PROCEDURE|PROCEDURAL|PRIMARY)\>"
icolor cyan "\<(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\>"
icolor cyan "\<(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\>"
icolor cyan "\<(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\>"
icolor cyan "\<(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\>"
icolor cyan "\<(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\>"
color green "\<(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\>"
# SQLite meta commands
icolor cyan "\.\<(databases|dump|echo|exit|explain|header(s)?|help)\>"
icolor cyan "\.\<(import|indices|mode|nullvalue|output|prompt|quit|read)\>"
icolor cyan "\.\<(schema|separator|show|tables|timeout|width)\>"
color brightcyan "\<(ON|OFF)\>"
color blue "\<([0-9]+)\>"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "`(\\.|[^\\`])*`"
color brightblack "\-\-.*$"
color ,green "[[:space:]]+$"
color ,red " + +| + +"