Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ankiaga
Copy link
Contributor

@ankiaga ankiaga commented Feb 5, 2024

indexes += "DROP INDEX {};".format(self.preparer.quote(index.name))

return indexes + constrs + str(drop_table)
return indexes + constrs + super().visit_drop_table(drop_table)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the same strategy for quoting identifiers for all operations in this method (and probably also in the entire file). In this method, it seems that most identifiers are quoted using preparer.quote(..).

Example: "DROP INDEX {};".format(self.preparer.quote(index.name)). Should we do that here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

self.preparer.quote (its a super class variable not overridden here) is the correct way as internally super().visit_drop_table() also calls self.preparer.quote

@ankiaga ankiaga added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2024
@ankiaga ankiaga merged commit 628d26c into main Feb 7, 2024
@ankiaga ankiaga deleted the drop_table_fix branch February 7, 2024 04:49
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-sqlalchemy API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants