Sitelet https://github.com/googleapis/python-spanner/pull/360
Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

fix: classify batched DDL statements - #360

Merged
larkee merged 3 commits into
googleapis:masterfrom
larkee:fix-ddl-parsing
Jun 23, 2021
Merged

larkee merged 3 commits into
googleapis:masterfrom
larkee:fix-ddl-parsing

Conversation

@larkee

@larkee larkee commented Jun 3, 2021

Copy link
Copy Markdown
Contributor

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 review from a team and IlyaFaer June 18, 2021 07:34

@IlyaFaer IlyaFaer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

Comment thread google/cloud/spanner_dbapi/cursor.py
@larkee
larkee force-pushed the fix-ddl-parsing branch from c1f6823 to 9645251 Compare June 23, 2021 22:12
@larkee
larkee merged commit b8b24e1 into googleapis:master Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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