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

refactor!: erase dbapi directory and all the related tests #554

Merged
merged 12 commits into from Nov 25, 2020
32 changes: 0 additions & 32 deletions .github/workflows/system-tests-against-emulator.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion django_spanner/compiler.py
Expand Up @@ -12,7 +12,8 @@
SQLInsertCompiler as BaseSQLInsertCompiler,
SQLUpdateCompiler as BaseSQLUpdateCompiler,
)
from django.db.utils import DatabaseError, add_dummy_where
from django.db.utils import DatabaseError
from django_spanner.utils import add_dummy_where


class SQLCompiler(BaseSQLCompiler):
Expand Down
18 changes: 9 additions & 9 deletions django_spanner/introspection.py
Expand Up @@ -10,22 +10,22 @@
TableInfo,
)
from django.db.models import Index
from google.cloud.spanner_v1.proto import type_pb2
from google.cloud.spanner_v1 import TypeCode


class DatabaseIntrospection(BaseDatabaseIntrospection):
data_types_reverse = {
type_pb2.BOOL: "BooleanField",
type_pb2.BYTES: "BinaryField",
type_pb2.DATE: "DateField",
type_pb2.FLOAT64: "FloatField",
type_pb2.INT64: "IntegerField",
type_pb2.STRING: "CharField",
type_pb2.TIMESTAMP: "DateTimeField",
TypeCode.BOOL: "BooleanField",
TypeCode.BYTES: "BinaryField",
TypeCode.DATE: "DateField",
TypeCode.FLOAT64: "FloatField",
TypeCode.INT64: "IntegerField",
TypeCode.STRING: "CharField",
TypeCode.TIMESTAMP: "DateTimeField",
}

def get_field_type(self, data_type, description):
if data_type == type_pb2.STRING and description.internal_size == "MAX":
if data_type == TypeCode.STRING and description.internal_size == "MAX":
return "TextField"
return super().get_field_type(data_type, description)

Expand Down
Empty file removed google/__init__.py
Empty file.
Empty file removed google/cloud/__init__.py
Empty file.
85 changes: 0 additions & 85 deletions google/cloud/spanner_dbapi/__init__.py

This file was deleted.

159 changes: 0 additions & 159 deletions google/cloud/spanner_dbapi/_helpers.py

This file was deleted.