Skip to content

spanner-jdbc: Support query hints for DML statements #1029

@ktchana

Description

@ktchana

New statement hint LOCK_SCANNED_RANGE is introduced to allow client transaction to request an exclusive lock on a set of ranges scanned by a transaction. This statement hint could be applied to both SELECT and UPDATE statements.

However, the current StatementParser only allow statement hints to exist in SELECT statement but not in UPDATE statements. Doing so in UPDATE statements will result in the following exception:

com.google.cloud.spanner.jdbc.JdbcSqlExceptionFactory$JdbcSqlExceptionImpl: INVALID_ARGUMENT: Unknown statement: @{LOCK_SCANNED_RANGES=exclusive} UPDATE ...

Need to update the StatementParser to include support to this new hint in UPDATE statements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: spannerIssues related to the googleapis/java-spanner API.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions