Describe the enhancement requested
Currently the ODBC driver explicitly only allows SELECT (see references [0] to [2]).
This issue spans adding a write-path to the driver for DML/DDL using DoPut and obtaining the returned row count.
SQLExecute and SQLExecDirect should both allow DML/DDL.
SQLRowCount should return the number of rows affected by an UPDATE, INSERT, or DELETE statement (as per the ODBC spec)
Depends on #51114.
This is the C++ analogue of apache/arrow-adbc#4074
Component(s)
FlightRPC
Related
References:
[0]-
|
// The driver is built to handle SELECT statements only. |
[1]-
|
// The driver is built to handle SELECT statements only. |
[2]-
|
void ODBCStatement::GetRowCount(SQLLEN* row_count_ptr) { |
|
if (!row_count_ptr) { |
|
// row count pointer is not valid, do nothing as ODBC spec does not mention this as an |
|
// error |
|
return; |
|
} |
|
// Will always be -1 (meaning number of rows unknown) since only SELECT is supported by |
|
// driver |
|
*row_count_ptr = -1; |
|
} |
Describe the enhancement requested
Currently the ODBC driver explicitly only allows
SELECT(see references [0] to [2]).This issue spans adding a write-path to the driver for DML/DDL using
DoPutand obtaining the returned row count.SQLExecuteandSQLExecDirectshould both allow DML/DDL.SQLRowCountshould return the number of rows affected by an UPDATE, INSERT, or DELETE statement (as per the ODBC spec)Depends on #51114.
This is the C++ analogue of apache/arrow-adbc#4074
Component(s)
FlightRPC
Related
References:
[0]-
arrow/cpp/src/arrow/flight/sql/odbc/odbc_api.cc
Line 1076 in 2e448f9
[1]-
arrow/cpp/src/arrow/flight/sql/odbc/odbc_api.cc
Line 1043 in 2e448f9
[2]-
arrow/cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_statement.cc
Lines 801 to 810 in 2e448f9