From 76c49082c4e0cf5b703403fb61c8fb39311d7a98 Mon Sep 17 00:00:00 2001 From: ygrek Date: Sun, 5 Jul 2009 15:30:10 +0300 Subject: [PATCH] some oracle types --- sql/rownum.sql | 4 ++-- sql_lexer.mll | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/rownum.sql b/sql/rownum.sql index f1b7a9b..94d8c4f 100644 --- a/sql/rownum.sql +++ b/sql/rownum.sql @@ -4,7 +4,7 @@ CREATE TABLE mytable ( id NUMBER(10) NOT NULL, paginator NUMBER(10) NOT NULL, - value VARCHAR2(50) + `value` VARCHAR2(50) ); ALTER TABLE mytable @@ -15,7 +15,7 @@ CREATE INDEX ix_mytable_paginator_id ON mytable(paginator, id); INSERT -INTO mytable(id, paginator, value) +INTO mytable(id, paginator, `value`) SELECT level, level / 10000, 'Value ' || level FROM dual CONNECT BY diff --git a/sql_lexer.mll b/sql_lexer.mll index e3af8e2..c431625 100644 --- a/sql_lexer.mll +++ b/sql_lexer.mll @@ -123,10 +123,12 @@ let keywords = *) all T_INTEGER ["integer";"int";"smallint";"bigint";"tinyint";"mediumint";"middleint";"serial";"identity"]; all T_INTEGER ["numeric";"decimal";"dec";"fixed"]; + all T_INTEGER ["number"]; (* oracle *) all T_BOOLEAN ["bool";"boolean"]; all T_FLOAT ["float";"real";"double";"float4";"float8";"int1";"int2";"int3";"int4";"int8"]; all T_BLOB ["blob";"varbinary";"tinyblob";"mediumblob";"longblob"]; all T_TEXT ["text";"char";"varchar";"tinytext";"mediumtext";"longtext"]; + all T_TEXT ["varchar2"]; (* oracle *) all T_DATETIME ["datetime";"year";]; !k -- 2.11.4.GIT