Skip to content

Commit 73b10d3

Browse files
mf2199c24t
authored andcommitted
chore: Code refactoring to follow common Google API scheme - Stage I (#487)
1 parent dea7cb9 commit 73b10d3

File tree

23 files changed

+32
-22
lines changed

23 files changed

+32
-22
lines changed

packages/django-google-spanner/django_spanner/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
# license that can be found in the LICENSE file or at
55
# https://developers.google.com/open-source/licenses/bsd
66

7-
import spanner_dbapi as Database
87
from django.db.backends.base.base import BaseDatabaseWrapper
9-
from google.cloud import spanner_v1 as spanner
8+
from google.cloud import spanner_v1 as spanner, spanner_dbapi as Database
109

1110
from .client import DatabaseClient
1211
from .creation import DatabaseCreation

packages/django-google-spanner/django_spanner/operations.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
from django.db.utils import DatabaseError
1717
from django.utils import timezone
1818
from django.utils.duration import duration_microseconds
19-
from spanner_dbapi.parse_utils import DateStr, TimestampStr, escape_name
19+
from google.cloud.spanner_dbapi.parse_utils import (
20+
DateStr,
21+
TimestampStr,
22+
escape_name,
23+
)
2024

2125

2226
class DatabaseOperations(BaseDatabaseOperations):

packages/django-google-spanner/google/__init__.py

Whitespace-only changes.

packages/django-google-spanner/google/cloud/__init__.py

Whitespace-only changes.

packages/django-google-spanner/spanner_dbapi/__init__.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def connect(
9797

9898

9999
__all__ = [
100+
"Connection",
100101
"DatabaseError",
101102
"DataError",
102103
"Error",

packages/django-google-spanner/spanner_dbapi/connection.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/connection.py

File renamed without changes.

packages/django-google-spanner/spanner_dbapi/cursor.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/cursor.py

File renamed without changes.

packages/django-google-spanner/spanner_dbapi/exceptions.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/exceptions.py

File renamed without changes.

packages/django-google-spanner/spanner_dbapi/parse_utils.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/parse_utils.py

File renamed without changes.

packages/django-google-spanner/spanner_dbapi/parser.py renamed to packages/django-google-spanner/google/cloud/spanner_dbapi/parser.py

File renamed without changes.

0 commit comments

Comments
 (0)