diff --git a/libgixpp/gix_esql_parser.yy b/libgixpp/gix_esql_parser.yy index 1895ec8..1e11479 100644 --- a/libgixpp/gix_esql_parser.yy +++ b/libgixpp/gix_esql_parser.yy @@ -155,7 +155,9 @@ static std::string to_std_string(connect_to_info_t *i) { if (i) { char buffer [3 %token COMP_5 "COMP-5" %token COMP %token CHAR +%token CHARF %token VARCHAR +%token VARCHAR2 %token BINARY %token VARBINARY %token FLOAT @@ -494,6 +496,10 @@ DECLARE_VAR TOKEN IS sql_type END_EXEC { driver->parser_data()->exec_list()->push_back(stmt); } } +| DECLARE_VAR error END_EXEC +{ + yyerrok; +} ; dbid: strliteral_or_hostref { $$ = $1; } @@ -911,7 +917,13 @@ sql_type: BINARY { $$ = (TYPE_SQL_BINARY << 60) + $1; } | VARBINARY { $$ = (TYPE_SQL_VARBINARY << 60) + $1; } | CHAR { $$ = (TYPE_SQL_CHAR << 60) + $1; } +| CHARF { $$ = (TYPE_SQL_CHAR << 60) + $1; + driver->warning(@$, "Unsupported SQL TYPE, will handle CHARF as CHAR."); +} | VARCHAR { $$ = (TYPE_SQL_VARCHAR << 60) + $1; } +| VARCHAR2{ $$ = (TYPE_SQL_VARCHAR << 60) + $1; + driver->warning(@$, "Unsupported SQL TYPE, will handle VARCHAR2 as VARCHAR."); +} | INTEGER { $$ = (TYPE_SQL_INT << 60) + $1; } | FLOAT { $$ = (TYPE_SQL_FLOAT << 60) + $1; } | DECIMAL { $$ = (TYPE_SQL_DECIMAL << 60) + $1; }