sqlalchemy-bigquery 1.11.0.dev2__py2.py3-none-any.whl → 1.12.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,8 @@
20
20
  SQLAlchemy dialect for Google BigQuery
21
21
  """
22
22
 
23
+ import warnings
24
+
23
25
  from .version import __version__
24
26
 
25
27
  from .base import BigQueryDialect, dialect
@@ -43,6 +45,20 @@ from ._types import (
43
45
  TIMESTAMP,
44
46
  )
45
47
 
48
+ from . import _versions_helpers
49
+
50
+ sys_major, sys_minor, sys_micro = _versions_helpers.extract_runtime_version()
51
+ if sys_major == 3 and sys_minor in (7, 8):
52
+ warnings.warn(
53
+ "The python-bigquery library will stop supporting Python 3.7 "
54
+ "and Python 3.8 in a future major release expected in Q4 2024. "
55
+ f"Your Python version is {sys_major}.{sys_minor}.{sys_micro}. We "
56
+ "recommend that you update soon to ensure ongoing support. For "
57
+ "more details, see: [Google Cloud Client Libraries Supported Python Versions policy](https://cloud.google.com/python/docs/supported-python-versions)",
58
+ PendingDeprecationWarning,
59
+ )
60
+
61
+
46
62
  __all__ = [
47
63
  "__version__",
48
64
  "dialect",
@@ -6,6 +6,7 @@
6
6
 
7
7
  import functools
8
8
  import re
9
+ from typing import Optional
9
10
 
10
11
  from google.api_core import client_info
11
12
  import google.auth
@@ -24,19 +25,48 @@ SCOPES = (
24
25
  )
25
26
 
26
27
 
27
- def google_client_info():
28
- user_agent = USER_AGENT_TEMPLATE.format(sqlalchemy.__version__)
28
+ def google_client_info(
29
+ user_agent: Optional[str] = None,
30
+ ) -> google.api_core.client_info.ClientInfo:
31
+ """
32
+ Return a client_info object, with an optional user agent
33
+ string. If user_agent is None, use a default value.
34
+ """
35
+
36
+ if user_agent is None:
37
+ user_agent = USER_AGENT_TEMPLATE.format(sqlalchemy.__version__)
29
38
  return client_info.ClientInfo(user_agent=user_agent)
30
39
 
31
40
 
32
41
  def create_bigquery_client(
33
- credentials_info=None,
34
- credentials_path=None,
35
- credentials_base64=None,
36
- default_query_job_config=None,
37
- location=None,
38
- project_id=None,
39
- ):
42
+ credentials_info: Optional[dict] = None,
43
+ credentials_path: Optional[str] = None,
44
+ credentials_base64: Optional[str] = None,
45
+ default_query_job_config: Optional[google.cloud.bigquery.job.QueryJobConfig] = None,
46
+ location: Optional[str] = None,
47
+ project_id: Optional[str] = None,
48
+ user_agent: Optional[google.api_core.client_info.ClientInfo] = None,
49
+ ) -> google.cloud.bigquery.Client:
50
+ """Construct a BigQuery client object.
51
+
52
+ Args:
53
+ credentials_info Optional[dict]:
54
+ credentials_path Optional[str]:
55
+ credentials_base64 Optional[str]:
56
+ default_query_job_config (Optional[google.cloud.bigquery.job.QueryJobConfig]):
57
+ Default ``QueryJobConfig``.
58
+ Will be merged into job configs passed into the ``query`` method.
59
+ location (Optional[str]):
60
+ Default location for jobs / datasets / tables.
61
+ project_id (Optional[str]):
62
+ Project ID for the project which the client acts on behalf of.
63
+ user_agent (Optional[google.api_core.client_info.ClientInfo]):
64
+ The client info used to send a user-agent string along with API
65
+ requests. If ``None``, then default info will be used. Generally,
66
+ you only need to set this if you're developing your own library
67
+ or partner tool.
68
+ """
69
+
40
70
  default_project = None
41
71
 
42
72
  if credentials_base64:
@@ -60,8 +90,10 @@ def create_bigquery_client(
60
90
  if project_id is None:
61
91
  project_id = default_project
62
92
 
93
+ client_info = google_client_info(user_agent=user_agent)
94
+
63
95
  return bigquery.Client(
64
- client_info=google_client_info(),
96
+ client_info=client_info,
65
97
  project=project_id,
66
98
  credentials=credentials,
67
99
  location=location,
@@ -0,0 +1,32 @@
1
+ # Copyright 2024 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """Shared helper functions for verifying versions of installed modules."""
16
+
17
+
18
+ import sys
19
+ from typing import Tuple
20
+
21
+
22
+ def extract_runtime_version() -> Tuple[int, int, int]:
23
+ # Retrieve the version information
24
+ version_info = sys.version_info
25
+
26
+ # Extract the major, minor, and micro components
27
+ major = version_info.major
28
+ minor = version_info.minor
29
+ micro = version_info.micro
30
+
31
+ # Display the version number in a clear format
32
+ return major, minor, micro
@@ -60,6 +60,7 @@ import re
60
60
 
61
61
  from .parse_url import parse_url
62
62
  from . import _helpers, _struct, _types
63
+ import sqlalchemy_bigquery_vendored.sqlalchemy.postgresql.base as vendored_postgresql
63
64
 
64
65
  # Illegal characters is intended to be all characters that are not explicitly
65
66
  # allowed as part of the flexible column names.
@@ -189,10 +190,12 @@ class BigQueryExecutionContext(DefaultExecutionContext):
189
190
  )
190
191
 
191
192
 
192
- class BigQueryCompiler(_struct.SQLCompiler, SQLCompiler):
193
+ class BigQueryCompiler(_struct.SQLCompiler, vendored_postgresql.PGCompiler):
193
194
  compound_keywords = SQLCompiler.compound_keywords.copy()
194
195
  compound_keywords[selectable.CompoundSelect.UNION] = "UNION DISTINCT"
195
196
  compound_keywords[selectable.CompoundSelect.UNION_ALL] = "UNION ALL"
197
+ compound_keywords[selectable.CompoundSelect.EXCEPT] = "EXCEPT DISTINCT"
198
+ compound_keywords[selectable.CompoundSelect.INTERSECT] = "INTERSECT DISTINCT"
196
199
 
197
200
  def __init__(self, dialect, statement, *args, **kwargs):
198
201
  if isinstance(statement, Column):
@@ -338,7 +341,12 @@ class BigQueryCompiler(_struct.SQLCompiler, SQLCompiler):
338
341
  # Flag set in the group_by_clause method. Works around missing
339
342
  # equivalent to supports_simple_order_by_label for group by.
340
343
  if within_group_by:
341
- kwargs["render_label_as_label"] = args[0]
344
+ column_label = args[0]
345
+ sql_keywords = {"GROUPING SETS", "ROLLUP", "CUBE"}
346
+ label_str = column_label.compile(dialect=self.dialect).string
347
+ if not any(keyword in label_str for keyword in sql_keywords):
348
+ kwargs["render_label_as_label"] = column_label
349
+
342
350
  return super(BigQueryCompiler, self).visit_label(*args, **kwargs)
343
351
 
344
352
  def group_by_clause(self, select, **kw):
@@ -395,8 +403,6 @@ class BigQueryCompiler(_struct.SQLCompiler, SQLCompiler):
395
403
  + ")"
396
404
  )
397
405
 
398
- visit_notin_op_binary = visit_not_in_op_binary # before 1.4
399
-
400
406
  ############################################################################
401
407
 
402
408
  ############################################################################
@@ -575,6 +581,9 @@ class BigQueryCompiler(_struct.SQLCompiler, SQLCompiler):
575
581
  def visit_not_regexp_match_op_binary(self, binary, operator, **kw):
576
582
  return "NOT %s" % self.visit_regexp_match_op_binary(binary, operator, **kw)
577
583
 
584
+ def visit_mod_binary(self, binary, operator, **kw):
585
+ return f"MOD({self.process(binary.left, **kw)}, {self.process(binary.right, **kw)})"
586
+
578
587
 
579
588
  class BigQueryTypeCompiler(GenericTypeCompiler):
580
589
  def visit_INTEGER(self, type_, **kw):
@@ -801,37 +810,99 @@ class BigQueryDDLCompiler(DDLCompiler):
801
810
  )
802
811
 
803
812
  def _process_time_partitioning(
804
- self, table: Table, time_partitioning: TimePartitioning
813
+ self,
814
+ table: Table,
815
+ time_partitioning: TimePartitioning,
805
816
  ):
806
817
  """
807
- Generates a SQL 'PARTITION BY' clause for partitioning a table by a date or timestamp.
818
+ Generates a SQL 'PARTITION BY' clause for partitioning a table,
808
819
 
809
820
  Args:
810
- - table (Table): The SQLAlchemy table object representing the BigQuery table to be partitioned.
821
+ - table (Table): The SQLAlchemy table object representing the BigQuery
822
+ table to be partitioned.
811
823
  - time_partitioning (TimePartitioning): The time partitioning details,
812
824
  including the field to be used for partitioning.
813
825
 
814
826
  Returns:
815
- - str: A SQL 'PARTITION BY' clause that uses either TIMESTAMP_TRUNC or DATE_TRUNC to
816
- partition data on the specified field.
827
+ - str: A SQL 'PARTITION BY' clause.
817
828
 
818
829
  Example:
819
- - Given a table with a TIMESTAMP type column 'event_timestamp' and setting
820
- 'time_partitioning.field' to 'event_timestamp', the function returns
830
+ - Given a table with an 'event_timestamp' and setting time_partitioning.type
831
+ as DAY and by setting 'time_partitioning.field' as 'event_timestamp', the
832
+ function returns:
821
833
  "PARTITION BY TIMESTAMP_TRUNC(event_timestamp, DAY)".
834
+
835
+ Current inputs allowed by BQ and covered by this function include:
836
+ * _PARTITIONDATE
837
+ * DATETIME_TRUNC(<datetime_column>, DAY/HOUR/MONTH/YEAR)
838
+ * TIMESTAMP_TRUNC(<timestamp_column>, DAY/HOUR/MONTH/YEAR)
839
+ * DATE_TRUNC(<date_column>, MONTH/YEAR)
840
+
841
+ Additional options allowed by BQ but not explicitly covered by this
842
+ function include:
843
+ * DATE(_PARTITIONTIME)
844
+ * DATE(<timestamp_column>)
845
+ * DATE(<datetime_column>)
846
+ * DATE column
822
847
  """
823
- field = "_PARTITIONDATE"
824
- trunc_fn = "DATE_TRUNC"
825
848
 
849
+ sqltypes = {
850
+ "_PARTITIONDATE": ("_PARTITIONDATE", None),
851
+ "TIMESTAMP": ("TIMESTAMP_TRUNC", {"DAY", "HOUR", "MONTH", "YEAR"}),
852
+ "DATETIME": ("DATETIME_TRUNC", {"DAY", "HOUR", "MONTH", "YEAR"}),
853
+ "DATE": ("DATE_TRUNC", {"MONTH", "YEAR"}),
854
+ }
855
+
856
+ # Extract field (i.e <column_name> or _PARTITIONDATE)
857
+ # AND extract the name of the column_type (i.e. "TIMESTAMP", "DATE",
858
+ # "DATETIME", "_PARTITIONDATE")
826
859
  if time_partitioning.field is not None:
827
860
  field = time_partitioning.field
828
- if isinstance(
829
- table.columns[time_partitioning.field].type,
830
- sqlalchemy.sql.sqltypes.TIMESTAMP,
831
- ):
832
- trunc_fn = "TIMESTAMP_TRUNC"
861
+ column_type = table.columns[field].type.__visit_name__.upper()
833
862
 
834
- return f"PARTITION BY {trunc_fn}({field}, {time_partitioning.type_})"
863
+ else:
864
+ field = "_PARTITIONDATE"
865
+ column_type = "_PARTITIONDATE"
866
+
867
+ # Extract time_partitioning.type_ (DAY, HOUR, MONTH, YEAR)
868
+ # i.e. generates one partition per type (1/DAY, 1/HOUR)
869
+ # NOTE: if time_partitioning.type_ == None, it gets
870
+ # immediately overwritten by python-bigquery to a default of DAY.
871
+ partitioning_period = time_partitioning.type_
872
+
873
+ # Extract the truncation_function (i.e. DATE_TRUNC)
874
+ # and the set of allowable partition_periods
875
+ # that can be used in that function
876
+ trunc_fn, allowed_partitions = sqltypes[column_type]
877
+
878
+ # Create output:
879
+ # Special Case: _PARTITIONDATE does NOT use a function or partitioning_period
880
+ if trunc_fn == "_PARTITIONDATE":
881
+ return f"PARTITION BY {field}"
882
+
883
+ # Special Case: BigQuery will not accept DAY as partitioning_period for
884
+ # DATE_TRUNC.
885
+ # However, the default argument in python-bigquery for TimePartioning
886
+ # is DAY. This case overwrites that to avoid making a breaking change in
887
+ # python-bigquery.
888
+ # https://github.com/googleapis/python-bigquery/blob/a4d9534a900f13ae7355904cda05097d781f27e3/google/cloud/bigquery/table.py#L2916
889
+ if trunc_fn == "DATE_TRUNC" and partitioning_period == "DAY":
890
+ raise ValueError(
891
+ "The TimePartitioning.type_ must be one of: "
892
+ f"{allowed_partitions}, received {partitioning_period}."
893
+ "NOTE: the `default` value for TimePartioning.type_ as set in "
894
+ "python-bigquery is 'DAY', if you wish to use 'DATE_TRUNC' "
895
+ "ensure that you overwrite the default TimePartitioning.type_. "
896
+ )
897
+
898
+ # Generic Case
899
+ if partitioning_period not in allowed_partitions:
900
+ raise ValueError(
901
+ "The TimePartitioning.type_ must be one of: "
902
+ f"{allowed_partitions}, received {partitioning_period}."
903
+ )
904
+
905
+ return f"PARTITION BY {trunc_fn}({field}, {partitioning_period})"
835
906
 
836
907
  def _process_range_partitioning(
837
908
  self, table: Table, range_partitioning: RangePartitioning
@@ -976,6 +1047,7 @@ class BigQueryDialect(DefaultDialect):
976
1047
  type_compiler = BigQueryTypeCompiler
977
1048
  ddl_compiler = BigQueryDDLCompiler
978
1049
  execution_ctx_cls = BigQueryExecutionContext
1050
+ cte_follows_insert = True
979
1051
  supports_alter = False
980
1052
  supports_comments = True
981
1053
  inline_comments = True
@@ -1001,6 +1073,7 @@ class BigQueryDialect(DefaultDialect):
1001
1073
  sqlalchemy.sql.sqltypes.Time: BQClassTaggedStr,
1002
1074
  sqlalchemy.sql.sqltypes.TIMESTAMP: BQTimestamp,
1003
1075
  sqlalchemy.sql.sqltypes.ARRAY: BQArray,
1076
+ sqlalchemy.sql.sqltypes.Enum: sqlalchemy.sql.sqltypes.Enum,
1004
1077
  }
1005
1078
 
1006
1079
  def __init__(
@@ -1313,18 +1386,36 @@ except ImportError: # pragma: NO COVER
1313
1386
  pass
1314
1387
  else:
1315
1388
  from alembic.ddl import impl
1316
- from alembic.ddl.base import ColumnType, format_type, alter_table, alter_column
1389
+ from alembic.ddl.base import (
1390
+ ColumnName,
1391
+ ColumnType,
1392
+ format_column_name,
1393
+ format_type,
1394
+ alter_table,
1395
+ alter_column,
1396
+ )
1317
1397
 
1318
1398
  class SqlalchemyBigqueryImpl(impl.DefaultImpl):
1319
1399
  __dialect__ = "bigquery"
1320
1400
 
1401
+ @compiles(ColumnName, "bigquery")
1402
+ def visit_column_name(element: ColumnName, compiler: DDLCompiler, **kw) -> str:
1403
+ """Replaces the visit_column_name() function in alembic/alembic/ddl/base.py.
1404
+ See https://github.com/googleapis/python-bigquery-sqlalchemy/issues/1097"""
1405
+
1406
+ return "%s RENAME COLUMN %s TO %s" % (
1407
+ alter_table(compiler, element.table_name, element.schema),
1408
+ format_column_name(compiler, element.column_name),
1409
+ format_column_name(compiler, element.newname),
1410
+ )
1411
+
1321
1412
  @compiles(ColumnType, "bigquery")
1322
1413
  def visit_column_type(element: ColumnType, compiler: DDLCompiler, **kw) -> str:
1323
1414
  """Replaces the visit_column_type() function in alembic/alembic/ddl/base.py.
1324
1415
  The alembic version ends in TYPE <element type>, but bigquery requires this syntax:
1325
1416
  SET DATA TYPE <element type>"""
1326
1417
 
1327
- return "%s %s %s" % ( # pragma: NO COVER
1418
+ return "%s %s %s" % (
1328
1419
  alter_table(compiler, element.table_name, element.schema),
1329
1420
  alter_column(compiler, element.column_name),
1330
1421
  "SET DATA TYPE %s" % format_type(compiler, element.type_),
@@ -17,4 +17,4 @@
17
17
  # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
18
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
19
 
20
- __version__ = "1.11.0.dev2"
20
+ __version__ = "1.12.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sqlalchemy-bigquery
3
- Version: 1.11.0.dev2
3
+ Version: 1.12.1
4
4
  Summary: SQLAlchemy dialect for BigQuery
5
5
  Home-page: https://github.com/googleapis/python-bigquery-sqlalchemy
6
6
  Author: The Sqlalchemy-Bigquery Authors
@@ -24,34 +24,34 @@ Requires-Python: >=3.8, <3.13
24
24
  Description-Content-Type: text/x-rst
25
25
  License-File: LICENSE
26
26
  License-File: AUTHORS
27
- Requires-Dist: google-api-core !=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5
28
- Requires-Dist: google-auth <3.0.0dev,>=1.25.0
29
- Requires-Dist: google-cloud-bigquery <4.0.0dev,>=3.3.6
27
+ Requires-Dist: google-api-core!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5
28
+ Requires-Dist: google-auth<3.0.0dev,>=1.25.0
29
+ Requires-Dist: google-cloud-bigquery<4.0.0dev,>=3.3.6
30
30
  Requires-Dist: packaging
31
- Requires-Dist: sqlalchemy <2.1,>=1.4.16
31
+ Requires-Dist: sqlalchemy<3.0.0dev,>=1.4.16
32
32
  Provides-Extra: alembic
33
- Requires-Dist: alembic ; extra == 'alembic'
33
+ Requires-Dist: alembic; extra == "alembic"
34
34
  Provides-Extra: all
35
- Requires-Dist: packaging ; extra == 'all'
36
- Requires-Dist: pytz ; extra == 'all'
37
- Requires-Dist: google-cloud-bigquery-storage <3.0.0dev,>=2.0.0 ; extra == 'all'
38
- Requires-Dist: GeoAlchemy2 ; extra == 'all'
39
- Requires-Dist: grpcio <2.0dev,>=1.47.0 ; extra == 'all'
40
- Requires-Dist: alembic ; extra == 'all'
41
- Requires-Dist: pyarrow >=3.0.0 ; extra == 'all'
42
- Requires-Dist: shapely ; extra == 'all'
43
- Requires-Dist: grpcio <2.0dev,>=1.49.1 ; (python_version >= "3.11") and extra == 'all'
35
+ Requires-Dist: GeoAlchemy2; extra == "all"
36
+ Requires-Dist: shapely; extra == "all"
37
+ Requires-Dist: grpcio<2.0dev,>=1.47.0; extra == "all"
38
+ Requires-Dist: pytz; extra == "all"
39
+ Requires-Dist: packaging; extra == "all"
40
+ Requires-Dist: pyarrow>=3.0.0; extra == "all"
41
+ Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.0.0; extra == "all"
42
+ Requires-Dist: alembic; extra == "all"
43
+ Requires-Dist: grpcio<2.0dev,>=1.49.1; python_version >= "3.11" and extra == "all"
44
44
  Provides-Extra: bqstorage
45
- Requires-Dist: google-cloud-bigquery-storage <3.0.0dev,>=2.0.0 ; extra == 'bqstorage'
46
- Requires-Dist: grpcio <2.0dev,>=1.47.0 ; extra == 'bqstorage'
47
- Requires-Dist: pyarrow >=3.0.0 ; extra == 'bqstorage'
48
- Requires-Dist: grpcio <2.0dev,>=1.49.1 ; (python_version >= "3.11") and extra == 'bqstorage'
45
+ Requires-Dist: google-cloud-bigquery-storage<3.0.0dev,>=2.0.0; extra == "bqstorage"
46
+ Requires-Dist: grpcio<2.0dev,>=1.47.0; extra == "bqstorage"
47
+ Requires-Dist: pyarrow>=3.0.0; extra == "bqstorage"
48
+ Requires-Dist: grpcio<2.0dev,>=1.49.1; python_version >= "3.11" and extra == "bqstorage"
49
49
  Provides-Extra: geography
50
- Requires-Dist: GeoAlchemy2 ; extra == 'geography'
51
- Requires-Dist: shapely ; extra == 'geography'
50
+ Requires-Dist: GeoAlchemy2; extra == "geography"
51
+ Requires-Dist: shapely; extra == "geography"
52
52
  Provides-Extra: tests
53
- Requires-Dist: packaging ; extra == 'tests'
54
- Requires-Dist: pytz ; extra == 'tests'
53
+ Requires-Dist: packaging; extra == "tests"
54
+ Requires-Dist: pytz; extra == "tests"
55
55
 
56
56
  SQLAlchemy Dialect for BigQuery
57
57
  ===============================
@@ -89,9 +89,6 @@ In order to use this library, you first need to go through the following steps:
89
89
  .. _Enable the BigQuery Storage API.: https://console.cloud.google.com/apis/library/bigquery.googleapis.com
90
90
  .. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
91
91
 
92
- .. note::
93
- This library is a prerelease to gauge compatiblity with SQLAlchemy
94
- versions >= 1.4.16 and < 2.1
95
92
 
96
93
  Installation
97
94
  ------------
@@ -164,7 +161,7 @@ SQLAlchemy
164
161
  from sqlalchemy.schema import *
165
162
  engine = create_engine('bigquery://project')
166
163
  table = Table('dataset.table', MetaData(bind=engine), autoload=True)
167
- print(select([func.count('*')], from_obj=table().scalar())
164
+ print(select([func.count('*')], from_obj=table().scalar()))
168
165
 
169
166
 
170
167
  Project
@@ -194,7 +191,7 @@ Alternatively, you can choose either of the following approaches:
194
191
  credentials_info = {
195
192
  "type": "service_account",
196
193
  "project_id": "your-service-account-project-id"
197
- },
194
+ }
198
195
  engine = create_engine('bigquery://', credentials_info=credentials_info)
199
196
 
200
197
  Location
@@ -0,0 +1,22 @@
1
+ sqlalchemy_bigquery/__init__.py,sha256=VUk7PyuIhCKnlD_-du5t1dXw0aM_4pOjEEeKWz2ifKY,2942
2
+ sqlalchemy_bigquery/_helpers.py,sha256=hHq_FXUKIxEXNbxyTrOumTdegbGpEHJyGXZBO2HvSWI,3909
3
+ sqlalchemy_bigquery/_struct.py,sha256=8FXKec6miXfnIIgNU4sOtRmVDLaDW47nawx7GZsKY-c,4382
4
+ sqlalchemy_bigquery/_types.py,sha256=H6GU6rb0uE7WiacdcHeJySxCG4oqZh-1UTAgcOdOqfY,4717
5
+ sqlalchemy_bigquery/_versions_helpers.py,sha256=ChEUHNB1zLfn1RwAiuh3TyyATuq7rdSNAYW-DkKFphs,1050
6
+ sqlalchemy_bigquery/base.py,sha256=_7LVFI_SNXVyVt_ZFrCwh25rF0bEm7rhjMT3v1UrXZ8,53728
7
+ sqlalchemy_bigquery/geography.py,sha256=WDwchFzccGX-JWzUyyD9Ed5vCJ8HNM42AO5bkTtZIII,8638
8
+ sqlalchemy_bigquery/parse_url.py,sha256=MY3WmwdA-6POiMLYRcmbRNr4WskNDcMjmmvixIzCeRc,9854
9
+ sqlalchemy_bigquery/requirements.py,sha256=g-H9wL8nPKQPycpRM6301ilOZdWwCgo_u-Gt2CA88M0,7483
10
+ sqlalchemy_bigquery/version.py,sha256=PKQKAaNztigHsy6TlTL2voENUwqC4wTrsmm99moFco0,1132
11
+ sqlalchemy_bigquery_vendored/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ sqlalchemy_bigquery_vendored/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ sqlalchemy_bigquery_vendored/sqlalchemy/__init__.py,sha256=GC-g9-eNi4h6k1SflXvdZfgL1x-Jm2I1G3bMNgVJpCE,232
14
+ sqlalchemy_bigquery_vendored/sqlalchemy/postgresql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ sqlalchemy_bigquery_vendored/sqlalchemy/postgresql/base.py,sha256=MVHIkulrKSWNZ3ufHqXwsqKR3YMCRfVIuB3T4K76Y0Y,615
16
+ sqlalchemy_bigquery-1.12.1.dist-info/AUTHORS,sha256=VFjWT1bATZc1vcMw7xO3Pdbqt9nS2yz9UZ_MrGST9-Q,653
17
+ sqlalchemy_bigquery-1.12.1.dist-info/LICENSE,sha256=qFx6vew4twGGX2m9qhNLIoGr8SznK1UWiRTYdCD95FY,1064
18
+ sqlalchemy_bigquery-1.12.1.dist-info/METADATA,sha256=XhGDiMdQu93qYiZwGXi3mTpND4hH5QjUurd5AnP2IEw,15029
19
+ sqlalchemy_bigquery-1.12.1.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
20
+ sqlalchemy_bigquery-1.12.1.dist-info/entry_points.txt,sha256=v8PQbVkcYJwtle5hojOBu94Jthva1D5Hty4QwMDYTjg,69
21
+ sqlalchemy_bigquery-1.12.1.dist-info/top_level.txt,sha256=YwR1oD5foKmwxej7P4POYaoaxmvIGz_9GSo79BAxkzo,49
22
+ sqlalchemy_bigquery-1.12.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ sqlalchemy_bigquery
2
+ sqlalchemy_bigquery_vendored
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ # __init__.py
2
+ # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
3
+ # <see AUTHORS file>
4
+ #
5
+ # This module is part of SQLAlchemy and is released under
6
+ # the MIT License: https://www.opensource.org/licenses/mit-license.php
@@ -0,0 +1,19 @@
1
+ # dialects/postgresql/base.py
2
+ # Copyright (C) 2005-2024 the SQLAlchemy authors and contributors
3
+ # <see AUTHORS file>
4
+ #
5
+ # This module is part of SQLAlchemy and is released under
6
+ # the MIT License: https://www.opensource.org/licenses/mit-license.php
7
+ # mypy: ignore-errors
8
+
9
+ from sqlalchemy.sql import compiler
10
+
11
+
12
+ class PGCompiler(compiler.SQLCompiler):
13
+ def update_from_clause(
14
+ self, update_stmt, from_table, extra_froms, from_hints, **kw
15
+ ):
16
+ kw["asfrom"] = True
17
+ return "FROM " + ", ".join(
18
+ t._compiler_dispatch(self, fromhints=from_hints, **kw) for t in extra_froms
19
+ )
@@ -1,16 +0,0 @@
1
- sqlalchemy_bigquery/__init__.py,sha256=5FwYx6_hZhCeS4G2eV1_tXzgEr7bZq7WmCpGWZs_zrc,2258
2
- sqlalchemy_bigquery/_helpers.py,sha256=MLclzia_4zASm_vqwpm1PoaB6KYOLXDqs6_KqrEbQB0,2412
3
- sqlalchemy_bigquery/_struct.py,sha256=8FXKec6miXfnIIgNU4sOtRmVDLaDW47nawx7GZsKY-c,4382
4
- sqlalchemy_bigquery/_types.py,sha256=H6GU6rb0uE7WiacdcHeJySxCG4oqZh-1UTAgcOdOqfY,4717
5
- sqlalchemy_bigquery/base.py,sha256=yZ-JHWflbvHWULiKhsArfsTYxyg7jqtsCdsKdWR0D8k,49673
6
- sqlalchemy_bigquery/geography.py,sha256=WDwchFzccGX-JWzUyyD9Ed5vCJ8HNM42AO5bkTtZIII,8638
7
- sqlalchemy_bigquery/parse_url.py,sha256=MY3WmwdA-6POiMLYRcmbRNr4WskNDcMjmmvixIzCeRc,9854
8
- sqlalchemy_bigquery/requirements.py,sha256=g-H9wL8nPKQPycpRM6301ilOZdWwCgo_u-Gt2CA88M0,7483
9
- sqlalchemy_bigquery/version.py,sha256=REpyIZtFdbzY9sKFp7Atd3212PsxmeVNZCE0IBOXrWw,1137
10
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/AUTHORS,sha256=VFjWT1bATZc1vcMw7xO3Pdbqt9nS2yz9UZ_MrGST9-Q,653
11
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/LICENSE,sha256=qFx6vew4twGGX2m9qhNLIoGr8SznK1UWiRTYdCD95FY,1064
12
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/METADATA,sha256=3GUPMkQL9ln3Yih2pHO-GLyDuS9EjztetkiuFROeBao,15175
13
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/WHEEL,sha256=P2T-6epvtXQ2cBOE_U1K4_noqlJFN3tj15djMgEu4NM,110
14
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/entry_points.txt,sha256=v8PQbVkcYJwtle5hojOBu94Jthva1D5Hty4QwMDYTjg,69
15
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/top_level.txt,sha256=8PyHRMIzFYGbGgpIXo35ShpB8nbea96cq6v_Afqwswc,20
16
- sqlalchemy_bigquery-1.11.0.dev2.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- sqlalchemy_bigquery