Skip to content

Add a backwards compatibility working mode #206

Closed
@bpintea

Description

@bpintea

Some of the 2.x applications - or even 3.x ones, updated from a 2.x base - make use of the ODBC API in a way that is currently difficult to support with ES/SQL API:

  • They prepare a statement with SQLPrepare, then require attributes of the columns that would be later fetched (by SQLExecute), with SQLNumResultCols and SQLColAttribute.
    This is difficult to support since there's no concept of statement preparation in ES/SQL. However, the driver could detect the pattern and issue something like SELECT * FROM (<original statement>) WHERE false. :: Add an early execution mode for prepared statements #227

  • They require the available rows after executing a statement, with SQLRowCount. The count is not currently available in ES/SQL API, which would need to be expanded, or, alternatively, the driver could issue something like SELECT COUNT(*) FROM (<original staement>).

  • Another case is the way tables are reported (TABLE vs BASE TABLE). The current server-side heuristic doesn't cover all clients expecting one format or the other and having a driver-side switch (=config option) both simplifies the server-code and makes the driver more useful with these apps. :: SQL: drop BASE TABLE type in favour for just TABLE elasticsearch#54836

This usage patterns are now discouraged or warned against by the current ODBC documentation, but not disallowed.

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