Skip to content

Commit

Permalink
Support x_long_long and x_unsigned_long_long input and output paramet…
Browse files Browse the repository at this point in the history
…ers (by Vadim Zeitlin)
  • Loading branch information
alexott committed May 26, 2012
1 parent 20b3a6a commit 6f5d8ea
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/backends/odbc/standard-into-type.cpp
Expand Up @@ -52,6 +52,14 @@ void odbc_standard_into_type_backend::define_by_pos(
odbcType_ = SQL_C_ULONG;
size = sizeof(unsigned long);
break;
case x_long_long:
odbcType_ = SQL_C_SBIGINT;
size = sizeof(long long);
break;
case x_unsigned_long_long:
odbcType_ = SQL_C_UBIGINT;
size = sizeof(unsigned long long);
break;
case x_double:
odbcType_ = SQL_C_DOUBLE;
size = sizeof(double);
Expand Down
12 changes: 10 additions & 2 deletions src/backends/odbc/standard-use-type.cpp
Expand Up @@ -35,6 +35,16 @@ void odbc_standard_use_type_backend::prepare_for_bind(
cType = SQL_C_ULONG;
size = sizeof(unsigned long);
break;
case x_long_long:
sqlType = SQL_BIGINT;
cType = SQL_C_SBIGINT;
size = sizeof(long long);
break;
case x_unsigned_long_long:
sqlType = SQL_BIGINT;
cType = SQL_C_UBIGINT;
size = sizeof(unsigned long long);
break;
case x_double:
sqlType = SQL_DOUBLE;
cType = SQL_C_DOUBLE;
Expand Down Expand Up @@ -97,8 +107,6 @@ void odbc_standard_use_type_backend::prepare_for_bind(
case x_statement:
case x_rowid:
break;
case x_long_long: break; // TODO: verify if can be supported
case x_unsigned_long_long: break; // TODO: verify if can be supported
}
}

Expand Down

0 comments on commit 6f5d8ea

Please sign in to comment.