impl(bq_driver): add sql_wvarchar impl#1487
Conversation
6aafd68 to
cf1be14
Compare
|
|
||
| TEST(StatementTest, UseWVarcharInsteadOfVarchar) { | ||
| auto conn = std::make_shared<ODBCHandles>(); | ||
| std::string const conn_str = kDefaultConnectionString + ";UseWVarChar=1"; |
There was a problem hiding this comment.
I don't think this test case makes sense, even if you don't use the 'UseWVarChar' param, it will still pass, please check this
There was a problem hiding this comment.
If we don't utilize UseWVarChar then test case will fail. It's verified.
There was a problem hiding this comment.
please verify separately as SQLGetData and SQLBindCol test parts looks generic
There was a problem hiding this comment.
Yes, It's passing. Removed now
| case SQL_INTERVAL_DAY_TO_SECOND: | ||
| case SQL_INTERVAL_HOUR_TO_SECOND: | ||
| case SQL_INTERVAL_MINUTE_TO_SECOND: | ||
| IntValueToOutputBufferResponse<SQLSMALLINT, SQLSMALLINT>( |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Reverted, Done
| octet_length = value * sizeof(SQLWCHAR); | ||
| break; | ||
| case SQL_WVARCHAR: | ||
| octet_length = value * 4; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
The value 8 is wrong. The size of SQLWCHAR is 2 on Windows and 4 on Linux. But after the latest existing driver update, it uses 4 for both systems
eea86eb to
86bf350
Compare
5b0276b to
c0d9b8d
Compare
54ec4fb to
c9a4838
Compare
db6011c to
3f17dff
Compare
af17c2b to
de70384
Compare
0fa1ca9 to
db2ac3b
Compare
db2ac3b to
6db07a9
Compare
6db07a9 to
041a6a2
Compare
This PR implements the UI feature and internal support for
UseWVarCharas described in the ticket. TheUseWVarCharoption can be configured through the driver UI, odbc.ini, and the connection string.windows gha checks: https://github.com/googleapis/cpp-bigquery-odbc/actions/runs/24066772452
Installer: https://drive.google.com/file/d/1Qb0qeLx_WmqIXMXw-G0Ac2fRPkB2ytJi/view?usp=drive_link
Here are Screenshot for same:

Note: I verified the current PR implementation of
SQLGetDataandSQLFetchwithUseWVarCharboth enabled and disabled. In both cases, the existing driver and the BQ driver behave the same—data is returned aswchareven whenUseWVarCharis disabled. Screenshots are attached for reference.