Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: classify batched DDL statements #360

Merged
merged 3 commits into from
Jun 23, 2021

Conversation

larkee
Copy link
Contributor

@larkee larkee commented Jun 3, 2021

Currently an SQL statement such as "CREATE TABLE t (...); INSERT INTO T (...)" would be classified as batched DDL despite not all the statements being DDL.

This PR adds a classification check for each of the statements and raises an error if any of the batched statements are non-DDL.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 3, 2021
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Jun 3, 2021
@larkee larkee marked this pull request as ready for review June 18, 2021 07:34
@larkee larkee requested a review from a team as a code owner June 18, 2021 07:34
@larkee larkee requested a review from IlyaFaer June 18, 2021 07:34
Copy link
Contributor

@IlyaFaer IlyaFaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

google/cloud/spanner_dbapi/cursor.py Show resolved Hide resolved
@larkee larkee merged commit b8b24e1 into googleapis:master Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants