sqlalchemy-bigquery 1.14.0__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.
@@ -0,0 +1,251 @@
1
+ # Copyright (c) 2021 The sqlalchemy-bigquery Authors
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ # this software and associated documentation files (the "Software"), to deal in
5
+ # the Software without restriction, including without limitation the rights to
6
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ # the Software, and to permit persons to whom the Software is furnished to do so,
8
+ # subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in all
11
+ # copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+ """
20
+ This module is used by the compliance tests to control which tests are run
21
+
22
+ based on database capabilities.
23
+ """
24
+
25
+ import sqlalchemy.testing.requirements
26
+ import sqlalchemy.testing.exclusions
27
+
28
+ supported = sqlalchemy.testing.exclusions.open
29
+ unsupported = sqlalchemy.testing.exclusions.closed
30
+
31
+
32
+ class Requirements(sqlalchemy.testing.requirements.SuiteRequirements):
33
+ @property
34
+ def index_reflection(self):
35
+ return unsupported()
36
+
37
+ @property
38
+ def indexes_with_ascdesc(self):
39
+ """target database supports CREATE INDEX with per-column ASC/DESC."""
40
+ return unsupported()
41
+
42
+ @property
43
+ def unique_constraint_reflection(self):
44
+ """target dialect supports reflection of unique constraints"""
45
+ return unsupported()
46
+
47
+ @property
48
+ def autoincrement_insert(self):
49
+ """target platform generates new surrogate integer primary key values
50
+ when insert() is executed, excluding the pk column."""
51
+ return unsupported()
52
+
53
+ @property
54
+ def primary_key_constraint_reflection(self):
55
+ return unsupported()
56
+
57
+ @property
58
+ def foreign_keys(self):
59
+ """Target database must support foreign keys."""
60
+
61
+ return unsupported()
62
+
63
+ @property
64
+ def foreign_key_constraint_reflection(self):
65
+ return unsupported()
66
+
67
+ @property
68
+ def on_update_cascade(self):
69
+ """target database must support ON UPDATE..CASCADE behavior in
70
+ foreign keys."""
71
+
72
+ return unsupported()
73
+
74
+ @property
75
+ def named_constraints(self):
76
+ """target database must support names for constraints."""
77
+
78
+ return unsupported()
79
+
80
+ @property
81
+ def temp_table_reflection(self):
82
+ return unsupported()
83
+
84
+ @property
85
+ def temporary_tables(self):
86
+ """target database supports temporary tables"""
87
+ return unsupported() # Temporary tables require use of scripts.
88
+
89
+ @property
90
+ def duplicate_key_raises_integrity_error(self):
91
+ """target dialect raises IntegrityError when reporting an INSERT
92
+ with a primary key violation. (hint: it should)
93
+
94
+ """
95
+ return unsupported()
96
+
97
+ @property
98
+ def precision_numerics_many_significant_digits(self):
99
+ """target backend supports values with many digits on both sides,
100
+ such as 319438950232418390.273596, 87673.594069654243
101
+
102
+ """
103
+ return supported()
104
+
105
+ @property
106
+ def date_coerces_from_datetime(self):
107
+ """target dialect accepts a datetime object as the target
108
+ of a date column."""
109
+
110
+ # BigQuery doesn't allow saving a datetime in a date:
111
+ # `TYPE_DATE`, Invalid date: '2012-10-15T12:57:18'
112
+
113
+ return unsupported()
114
+
115
+ @property
116
+ def window_functions(self):
117
+ """Target database must support window functions."""
118
+ return supported() # There are no tests for this. <shrug>
119
+
120
+ @property
121
+ def ctes(self):
122
+ """Target database supports CTEs"""
123
+
124
+ return supported()
125
+
126
+ @property
127
+ def views(self):
128
+ """Target database must support VIEWs."""
129
+
130
+ return supported()
131
+
132
+ @property
133
+ def schemas(self):
134
+ """Target database must support external schemas, and have one
135
+ named 'test_schema'."""
136
+
137
+ return unsupported()
138
+
139
+ @property
140
+ def array_type(self):
141
+ """Target database must support array_type"""
142
+ return supported()
143
+
144
+ @property
145
+ def implicit_default_schema(self):
146
+ """target system has a strong concept of 'default' schema that can
147
+ be referred to implicitly.
148
+
149
+ basically, PostgreSQL.
150
+
151
+ """
152
+ return supported()
153
+
154
+ @property
155
+ def comment_reflection(self):
156
+ return supported() # Well, probably not, but we'll try. :)
157
+
158
+ @property
159
+ def unicode_ddl(self):
160
+ """Target driver must support some degree of non-ascii symbol
161
+ names.
162
+
163
+ However:
164
+
165
+ Must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_)
166
+
167
+ https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#column_name_and_column_schema
168
+ """
169
+ return unsupported()
170
+
171
+ @property
172
+ def datetime_literals(self):
173
+ """target dialect supports rendering of a date, time, or datetime as a
174
+ literal string, e.g. via the TypeEngine.literal_processor() method.
175
+
176
+ """
177
+
178
+ return supported()
179
+
180
+ @property
181
+ def timestamp_microseconds(self):
182
+ """target dialect supports representation of Python
183
+ datetime.datetime() with microsecond objects but only
184
+ if TIMESTAMP is used."""
185
+ return supported()
186
+
187
+ @property
188
+ def datetime_historic(self):
189
+ """target dialect supports representation of Python
190
+ datetime.datetime() objects with historic (pre 1970) values."""
191
+
192
+ return supported()
193
+
194
+ @property
195
+ def date_historic(self):
196
+ """target dialect supports representation of Python
197
+ datetime.datetime() objects with historic (pre 1970) values."""
198
+
199
+ return supported()
200
+
201
+ @property
202
+ def precision_numerics_enotation_small(self):
203
+ """target backend supports Decimal() objects using E notation
204
+ to represent very small values."""
205
+ return supported()
206
+
207
+ @property
208
+ def precision_numerics_enotation_large(self):
209
+ """target backend supports Decimal() objects using E notation
210
+ to represent very large values."""
211
+ return supported()
212
+
213
+ @property
214
+ def update_from(self):
215
+ """Target must support UPDATE..FROM syntax"""
216
+ return supported()
217
+
218
+ @property
219
+ def order_by_label_with_expression(self):
220
+ """target backend supports ORDER BY a column label within an
221
+ expression.
222
+
223
+ Basically this::
224
+
225
+ select data as foo from test order by foo || 'bar'
226
+
227
+ Lots of databases including PostgreSQL don't support this,
228
+ so this is off by default.
229
+
230
+ """
231
+ return supported()
232
+
233
+ @property
234
+ def sql_expression_limit_offset(self):
235
+ """target database can render LIMIT and/or OFFSET with a complete
236
+ SQL expression, such as one that uses the addition operator.
237
+ parameter
238
+ """
239
+ return unsupported()
240
+
241
+
242
+ class WithSchemas(Requirements):
243
+ """
244
+ Option to run without schema tests
245
+
246
+ because the `test_schema` name can't be overridden.
247
+ """
248
+
249
+ @property
250
+ def schemas(self):
251
+ return supported()
@@ -0,0 +1,20 @@
1
+ # Copyright (c) 2021 The sqlalchemy-bigquery Authors
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ # this software and associated documentation files (the "Software"), to deal in
5
+ # the Software without restriction, including without limitation the rights to
6
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ # the Software, and to permit persons to whom the Software is furnished to do so,
8
+ # subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in all
11
+ # copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+
20
+ __version__ = "1.14.0"
@@ -0,0 +1,26 @@
1
+ # This is the list of sqlalchemy-bigquery's significant contributors.
2
+ #
3
+ # This does not necessarily list everyone who has contributed code,
4
+ # especially since many employees of one corporation may be contributing.
5
+ # To see the full list of contributors, see the revision history in
6
+ # source control.
7
+ alm (alonme)
8
+ Arttu Modig (amodig)
9
+ Blaine Hansen (blainehansen)
10
+ Dmytro Karacheban
11
+ Google LLC
12
+ Harshal Sheth
13
+ Jacob Hayes
14
+ James Campbell
15
+ Jim Fulton
16
+ Joshua Carp
17
+ Kurian (kuriancheeramelil)
18
+ Maksym Voitko
19
+ Maxim Zudilov (mxmzdlv)
20
+ Maxime Beauchemin (mistercrunch)
21
+ Romain Rigaux
22
+ Sharoon Thomas (sharoonthomas)
23
+ Sumedh Sakdeo
24
+ Tim Swast (tswast)
25
+ Vince Broz
26
+ Wade Tsai
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 mxmzdlv
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.