Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to work around some sqltype issues #156

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions libgixpp/gix_esql_parser.yy
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t> CHAR
%token<uint64_t> CHARF
%token<uint64_t> VARCHAR
%token<uint64_t> VARCHAR2
%token<uint64_t> BINARY
%token<uint64_t> VARBINARY
%token<uint64_t> FLOAT
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand Down