summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/sql.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-10-19 17:34:39 +0000
committermurphy <murphy@rubychan.de>2009-10-19 17:34:39 +0000
commit9eba0c7decb383e3ef73a3fee375e725442cde56 (patch)
tree0e88e051c045bb2a7c5db6020024d8c47466676f /lib/coderay/scanners/sql.rb
parenteada01e24c1402c6e390579d60ca174f15e74f6b (diff)
downloadcoderay-9eba0c7decb383e3ef73a3fee375e725442cde56.tar.gz
Updating scanners: Ruby 1.9 warnings, KINDS_NOT_LOC
* Also, DATABASE is a SQL keyword.
Diffstat (limited to 'lib/coderay/scanners/sql.rb')
-rw-r--r--lib/coderay/scanners/sql.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/scanners/sql.rb b/lib/coderay/scanners/sql.rb
index d889be5..2b21c79 100644
--- a/lib/coderay/scanners/sql.rb
+++ b/lib/coderay/scanners/sql.rb
@@ -6,7 +6,7 @@ module CodeRay module Scanners
register_for :sql
RESERVED_WORDS = %w(
- create table index trigger drop primary key set select
+ create database table index trigger drop primary key set select
insert update delete replace into
on from values before and or if exists case when
then else as group order by avg where
@@ -35,7 +35,7 @@ module CodeRay module Scanners
add(PREDEFINED_FUNCTIONS, :predefined).
add(DIRECTIVES, :directive)
- ESCAPE = / [rbfnrtv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | . /mx
+ ESCAPE = / [rbfntv\n\\\/'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} | . /mx
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x
STRING_PREFIXES = /[xnb]|_\w+/i