Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sqlalchemy.schema.DropTable compilation: Table name should be quoted by back quotes (`) on DROP TABLE #349

Copy link
Copy link
Open
@rkawajiri

Description

@rkawajiri
Issue body actions

Environment details

  • Programming language: python
  • OS: debian (official docker image python:3.11-bullseye)
  • Language runtime version: python 3.11.6
  • Package version:
    • sqlalchemy-spanner==1.6.2
    • sqlalchemy==2.0.22

Steps to reproduce

Execute this code.

from sqlalchemy.schema import DropTable, CreateTable
from sqlalchemy.orm import DeclarativeBase, mapped_column, Mapped
from google.cloud.sqlalchemy_spanner import SpannerDialect

class Base(DeclarativeBase):
    pass

class User(Base):
    __tablename__ = 'Users'

    id: Mapped[int] = mapped_column(primary_key=True)

print(CreateTable(User.__table__).compile(dialect=SpannerDialect()).string)
print(DropTable(User.__table__).compile(dialect=SpannerDialect()).string)

then it will print

CREATE TABLE `Users` (
	id INT64 NOT NULL
) PRIMARY KEY (id)

DROP TABLE "Users"

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.Issues related to the googleapis/python-spanner-sqlalchemy API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.