Skip to content

[FlightSQL][C++][ODBC] Add DML support to the ODBC driver #51115

Description

@ennuite

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions