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

odbc: Fallback to string for unknown sql types #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 1 addition & 11 deletions src/ls_odbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,6 @@ static int cur_shut(lua_State *L, cur_data *cur)
*/
static const char *sqltypetolua (const SQLSMALLINT type) {
switch (type) {
case SQL_UNKNOWN_TYPE: case SQL_CHAR: case SQL_VARCHAR:
case SQL_TYPE_DATE: case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP:
case SQL_DATE: case SQL_INTERVAL: case SQL_TIMESTAMP:
case SQL_LONGVARCHAR:
case SQL_WCHAR: case SQL_WVARCHAR: case SQL_WLONGVARCHAR:
#if (ODBCVER >= 0x0350)
case SQL_GUID:
#endif
return "string";
case SQL_BIGINT: case SQL_TINYINT:
case SQL_INTEGER: case SQL_SMALLINT:
#if LUA_VERSION_NUM>=503
Expand All @@ -314,8 +305,7 @@ static const char *sqltypetolua (const SQLSMALLINT type) {
case SQL_BIT:
return "boolean";
default:
assert(0);
return NULL;
return "string";
}
}

Expand Down