Closed jamescjohns closed 10 years ago
Here: https://github.com/daylerees/anbu/blob/master/src/Modules/QueryLogger/QueryLogger.php#L42
Not sure how you'd like to handle these as the list is rather large (http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html)!
I'll PR if you're happy for them all to be included?
/** * SQL keywords to highlight. * * @var array */ protected $keywords = ['add', 'all', 'alter', 'analyze', 'and', 'as', 'asc', 'asensitive', 'before', 'between', 'bigint', 'binary', 'blob', 'both', 'by', 'call', 'cascade', 'case', 'change', 'char', 'character', 'check', 'collate', 'column', 'condition', 'constraint', 'continue', 'convert', 'create', 'cross', 'current_date', 'current_time', 'current_timestamp', 'current_user', 'cursor', 'database', 'databases', 'day_hour', 'day_microsecond', 'day_minute', 'day_second', 'dec', 'decimal', 'declare', 'default', 'delayed', 'delete', 'desc', 'describe', 'deterministic', 'distinct', 'distinctrow', 'div', 'double', 'drop', 'dual', 'each', 'else', 'elseif', 'enclosed', 'escaped', 'exists', 'exit', 'explain', 'false', 'fetch', 'float', 'float4', 'float8', 'for', 'force', 'foreign', 'from', 'fulltext', 'grant', 'group', 'having', 'high_priority', 'hour_microsecond', 'hour_minute', 'hour_second', 'if', 'ignore', 'in', 'index', 'infile', 'inner', 'inout', 'insensitive', 'insert', 'int', 'int1', 'int2', 'int3', 'int4', 'int8', 'integer', 'interval', 'into', 'is', 'iterate', 'join', 'key', 'keys', 'kill', 'leading', 'leave', 'left', 'like', 'limit', 'lines', 'load', 'localtime', 'localtimestamp', 'lock', 'long', 'longblob', 'longtext', 'loop', 'low_priority', 'match', 'mediumblob', 'mediumint', 'mediumtext', 'middleint', 'minute_microsecond', 'minute_second', 'mod', 'modifies', 'natural', 'not', 'no_write_to_binlog', 'null', 'numeric', 'on', 'optimize', 'option', 'optionally', 'or', 'order', 'out', 'outer', 'outfile', 'precision', 'primary', 'procedure', 'purge', 'read', 'reads', 'real', 'references', 'regexp', 'release', 'rename', 'repeat', 'replace', 'require', 'restrict', 'return', 'revoke', 'right', 'rlike', 'schema', 'schemas', 'second_microsecond', 'select', 'sensitive', 'separator', 'set', 'show', 'smallint', 'soname', 'spatial', 'specific', 'sql', 'sqlexception', 'sqlstate', 'sqlwarning', 'sql_big_result', 'sql_calc_found_rows', 'sql_small_result', 'ssl starting', 'straight_join', 'table', 'terminated', 'then', 'tinyblob', 'tinyint', 'tinytext', 'to', 'trailing', 'trigger true', 'undo', 'union', 'unique', 'unlock', 'unsigned', 'update', 'usage', 'use using', 'utc_date', 'utc_time', 'utc_timestamp', 'values', 'varbinary', 'varchar', 'varcharacter', 'varying when', 'where', 'while', 'with', 'write', 'xor year_month', 'zerofill', 'asensitive', 'call', 'condition', 'connection', 'continue', 'cursor', 'declare deterministic', 'each', 'elseif', 'exit', 'fetch', 'goto', 'inout', 'insensitive', 'iterate', 'label', 'leave', 'loop', 'modifies', 'out', 'reads', 'release repeat', 'return', 'schema', 'schemas', 'sensitive', 'specific', 'sql', 'sqlexception', 'sqlstate', 'sqlwarning', 'trigger undo', 'upgrade', 'while'];
Hey dude, would you wanna PR them inline (as they are in the snippet). I figure I can always clean up the long line some other time. If not I'll paste it into my next commit.
Thanks man.
Thanks :)
Here: https://github.com/daylerees/anbu/blob/master/src/Modules/QueryLogger/QueryLogger.php#L42
Not sure how you'd like to handle these as the list is rather large (http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html)!
I'll PR if you're happy for them all to be included?