SQLAlchemy 2.0.47__cp313-cp313t-win32.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.
Files changed (274) hide show
  1. sqlalchemy/__init__.py +283 -0
  2. sqlalchemy/connectors/__init__.py +18 -0
  3. sqlalchemy/connectors/aioodbc.py +184 -0
  4. sqlalchemy/connectors/asyncio.py +429 -0
  5. sqlalchemy/connectors/pyodbc.py +250 -0
  6. sqlalchemy/cyextension/__init__.py +6 -0
  7. sqlalchemy/cyextension/collections.cp313t-win32.pyd +0 -0
  8. sqlalchemy/cyextension/collections.pyx +409 -0
  9. sqlalchemy/cyextension/immutabledict.cp313t-win32.pyd +0 -0
  10. sqlalchemy/cyextension/immutabledict.pxd +8 -0
  11. sqlalchemy/cyextension/immutabledict.pyx +133 -0
  12. sqlalchemy/cyextension/processors.cp313t-win32.pyd +0 -0
  13. sqlalchemy/cyextension/processors.pyx +68 -0
  14. sqlalchemy/cyextension/resultproxy.cp313t-win32.pyd +0 -0
  15. sqlalchemy/cyextension/resultproxy.pyx +102 -0
  16. sqlalchemy/cyextension/util.cp313t-win32.pyd +0 -0
  17. sqlalchemy/cyextension/util.pyx +90 -0
  18. sqlalchemy/dialects/__init__.py +62 -0
  19. sqlalchemy/dialects/_typing.py +30 -0
  20. sqlalchemy/dialects/mssql/__init__.py +88 -0
  21. sqlalchemy/dialects/mssql/aioodbc.py +63 -0
  22. sqlalchemy/dialects/mssql/base.py +4093 -0
  23. sqlalchemy/dialects/mssql/information_schema.py +285 -0
  24. sqlalchemy/dialects/mssql/json.py +129 -0
  25. sqlalchemy/dialects/mssql/provision.py +185 -0
  26. sqlalchemy/dialects/mssql/pymssql.py +126 -0
  27. sqlalchemy/dialects/mssql/pyodbc.py +760 -0
  28. sqlalchemy/dialects/mysql/__init__.py +104 -0
  29. sqlalchemy/dialects/mysql/aiomysql.py +250 -0
  30. sqlalchemy/dialects/mysql/asyncmy.py +231 -0
  31. sqlalchemy/dialects/mysql/base.py +3949 -0
  32. sqlalchemy/dialects/mysql/cymysql.py +106 -0
  33. sqlalchemy/dialects/mysql/dml.py +225 -0
  34. sqlalchemy/dialects/mysql/enumerated.py +282 -0
  35. sqlalchemy/dialects/mysql/expression.py +146 -0
  36. sqlalchemy/dialects/mysql/json.py +91 -0
  37. sqlalchemy/dialects/mysql/mariadb.py +72 -0
  38. sqlalchemy/dialects/mysql/mariadbconnector.py +322 -0
  39. sqlalchemy/dialects/mysql/mysqlconnector.py +302 -0
  40. sqlalchemy/dialects/mysql/mysqldb.py +314 -0
  41. sqlalchemy/dialects/mysql/provision.py +153 -0
  42. sqlalchemy/dialects/mysql/pymysql.py +158 -0
  43. sqlalchemy/dialects/mysql/pyodbc.py +157 -0
  44. sqlalchemy/dialects/mysql/reflection.py +727 -0
  45. sqlalchemy/dialects/mysql/reserved_words.py +570 -0
  46. sqlalchemy/dialects/mysql/types.py +835 -0
  47. sqlalchemy/dialects/oracle/__init__.py +81 -0
  48. sqlalchemy/dialects/oracle/base.py +3802 -0
  49. sqlalchemy/dialects/oracle/cx_oracle.py +1555 -0
  50. sqlalchemy/dialects/oracle/dictionary.py +507 -0
  51. sqlalchemy/dialects/oracle/oracledb.py +941 -0
  52. sqlalchemy/dialects/oracle/provision.py +297 -0
  53. sqlalchemy/dialects/oracle/types.py +316 -0
  54. sqlalchemy/dialects/oracle/vector.py +365 -0
  55. sqlalchemy/dialects/postgresql/__init__.py +167 -0
  56. sqlalchemy/dialects/postgresql/_psycopg_common.py +189 -0
  57. sqlalchemy/dialects/postgresql/array.py +519 -0
  58. sqlalchemy/dialects/postgresql/asyncpg.py +1284 -0
  59. sqlalchemy/dialects/postgresql/base.py +5378 -0
  60. sqlalchemy/dialects/postgresql/dml.py +339 -0
  61. sqlalchemy/dialects/postgresql/ext.py +540 -0
  62. sqlalchemy/dialects/postgresql/hstore.py +406 -0
  63. sqlalchemy/dialects/postgresql/json.py +404 -0
  64. sqlalchemy/dialects/postgresql/named_types.py +524 -0
  65. sqlalchemy/dialects/postgresql/operators.py +129 -0
  66. sqlalchemy/dialects/postgresql/pg8000.py +669 -0
  67. sqlalchemy/dialects/postgresql/pg_catalog.py +326 -0
  68. sqlalchemy/dialects/postgresql/provision.py +183 -0
  69. sqlalchemy/dialects/postgresql/psycopg.py +862 -0
  70. sqlalchemy/dialects/postgresql/psycopg2.py +892 -0
  71. sqlalchemy/dialects/postgresql/psycopg2cffi.py +61 -0
  72. sqlalchemy/dialects/postgresql/ranges.py +1031 -0
  73. sqlalchemy/dialects/postgresql/types.py +313 -0
  74. sqlalchemy/dialects/sqlite/__init__.py +57 -0
  75. sqlalchemy/dialects/sqlite/aiosqlite.py +482 -0
  76. sqlalchemy/dialects/sqlite/base.py +3056 -0
  77. sqlalchemy/dialects/sqlite/dml.py +263 -0
  78. sqlalchemy/dialects/sqlite/json.py +92 -0
  79. sqlalchemy/dialects/sqlite/provision.py +229 -0
  80. sqlalchemy/dialects/sqlite/pysqlcipher.py +157 -0
  81. sqlalchemy/dialects/sqlite/pysqlite.py +756 -0
  82. sqlalchemy/dialects/type_migration_guidelines.txt +145 -0
  83. sqlalchemy/engine/__init__.py +62 -0
  84. sqlalchemy/engine/_py_processors.py +136 -0
  85. sqlalchemy/engine/_py_row.py +128 -0
  86. sqlalchemy/engine/_py_util.py +74 -0
  87. sqlalchemy/engine/base.py +3390 -0
  88. sqlalchemy/engine/characteristics.py +155 -0
  89. sqlalchemy/engine/create.py +893 -0
  90. sqlalchemy/engine/cursor.py +2298 -0
  91. sqlalchemy/engine/default.py +2394 -0
  92. sqlalchemy/engine/events.py +965 -0
  93. sqlalchemy/engine/interfaces.py +3471 -0
  94. sqlalchemy/engine/mock.py +134 -0
  95. sqlalchemy/engine/processors.py +61 -0
  96. sqlalchemy/engine/reflection.py +2102 -0
  97. sqlalchemy/engine/result.py +2399 -0
  98. sqlalchemy/engine/row.py +400 -0
  99. sqlalchemy/engine/strategies.py +16 -0
  100. sqlalchemy/engine/url.py +924 -0
  101. sqlalchemy/engine/util.py +167 -0
  102. sqlalchemy/event/__init__.py +26 -0
  103. sqlalchemy/event/api.py +220 -0
  104. sqlalchemy/event/attr.py +676 -0
  105. sqlalchemy/event/base.py +472 -0
  106. sqlalchemy/event/legacy.py +258 -0
  107. sqlalchemy/event/registry.py +390 -0
  108. sqlalchemy/events.py +17 -0
  109. sqlalchemy/exc.py +832 -0
  110. sqlalchemy/ext/__init__.py +11 -0
  111. sqlalchemy/ext/associationproxy.py +2027 -0
  112. sqlalchemy/ext/asyncio/__init__.py +25 -0
  113. sqlalchemy/ext/asyncio/base.py +281 -0
  114. sqlalchemy/ext/asyncio/engine.py +1471 -0
  115. sqlalchemy/ext/asyncio/exc.py +21 -0
  116. sqlalchemy/ext/asyncio/result.py +965 -0
  117. sqlalchemy/ext/asyncio/scoping.py +1599 -0
  118. sqlalchemy/ext/asyncio/session.py +1947 -0
  119. sqlalchemy/ext/automap.py +1701 -0
  120. sqlalchemy/ext/baked.py +570 -0
  121. sqlalchemy/ext/compiler.py +600 -0
  122. sqlalchemy/ext/declarative/__init__.py +65 -0
  123. sqlalchemy/ext/declarative/extensions.py +564 -0
  124. sqlalchemy/ext/horizontal_shard.py +478 -0
  125. sqlalchemy/ext/hybrid.py +1535 -0
  126. sqlalchemy/ext/indexable.py +364 -0
  127. sqlalchemy/ext/instrumentation.py +450 -0
  128. sqlalchemy/ext/mutable.py +1085 -0
  129. sqlalchemy/ext/mypy/__init__.py +6 -0
  130. sqlalchemy/ext/mypy/apply.py +324 -0
  131. sqlalchemy/ext/mypy/decl_class.py +515 -0
  132. sqlalchemy/ext/mypy/infer.py +590 -0
  133. sqlalchemy/ext/mypy/names.py +335 -0
  134. sqlalchemy/ext/mypy/plugin.py +303 -0
  135. sqlalchemy/ext/mypy/util.py +357 -0
  136. sqlalchemy/ext/orderinglist.py +439 -0
  137. sqlalchemy/ext/serializer.py +185 -0
  138. sqlalchemy/future/__init__.py +16 -0
  139. sqlalchemy/future/engine.py +15 -0
  140. sqlalchemy/inspection.py +174 -0
  141. sqlalchemy/log.py +288 -0
  142. sqlalchemy/orm/__init__.py +171 -0
  143. sqlalchemy/orm/_orm_constructors.py +2661 -0
  144. sqlalchemy/orm/_typing.py +179 -0
  145. sqlalchemy/orm/attributes.py +2845 -0
  146. sqlalchemy/orm/base.py +971 -0
  147. sqlalchemy/orm/bulk_persistence.py +2135 -0
  148. sqlalchemy/orm/clsregistry.py +571 -0
  149. sqlalchemy/orm/collections.py +1627 -0
  150. sqlalchemy/orm/context.py +3334 -0
  151. sqlalchemy/orm/decl_api.py +2004 -0
  152. sqlalchemy/orm/decl_base.py +2192 -0
  153. sqlalchemy/orm/dependency.py +1302 -0
  154. sqlalchemy/orm/descriptor_props.py +1092 -0
  155. sqlalchemy/orm/dynamic.py +300 -0
  156. sqlalchemy/orm/evaluator.py +379 -0
  157. sqlalchemy/orm/events.py +3252 -0
  158. sqlalchemy/orm/exc.py +237 -0
  159. sqlalchemy/orm/identity.py +302 -0
  160. sqlalchemy/orm/instrumentation.py +754 -0
  161. sqlalchemy/orm/interfaces.py +1496 -0
  162. sqlalchemy/orm/loading.py +1686 -0
  163. sqlalchemy/orm/mapped_collection.py +557 -0
  164. sqlalchemy/orm/mapper.py +4444 -0
  165. sqlalchemy/orm/path_registry.py +809 -0
  166. sqlalchemy/orm/persistence.py +1788 -0
  167. sqlalchemy/orm/properties.py +935 -0
  168. sqlalchemy/orm/query.py +3459 -0
  169. sqlalchemy/orm/relationships.py +3508 -0
  170. sqlalchemy/orm/scoping.py +2148 -0
  171. sqlalchemy/orm/session.py +5280 -0
  172. sqlalchemy/orm/state.py +1168 -0
  173. sqlalchemy/orm/state_changes.py +196 -0
  174. sqlalchemy/orm/strategies.py +3470 -0
  175. sqlalchemy/orm/strategy_options.py +2568 -0
  176. sqlalchemy/orm/sync.py +164 -0
  177. sqlalchemy/orm/unitofwork.py +796 -0
  178. sqlalchemy/orm/util.py +2403 -0
  179. sqlalchemy/orm/writeonly.py +674 -0
  180. sqlalchemy/pool/__init__.py +44 -0
  181. sqlalchemy/pool/base.py +1524 -0
  182. sqlalchemy/pool/events.py +375 -0
  183. sqlalchemy/pool/impl.py +588 -0
  184. sqlalchemy/py.typed +0 -0
  185. sqlalchemy/schema.py +69 -0
  186. sqlalchemy/sql/__init__.py +145 -0
  187. sqlalchemy/sql/_dml_constructors.py +132 -0
  188. sqlalchemy/sql/_elements_constructors.py +1872 -0
  189. sqlalchemy/sql/_orm_types.py +20 -0
  190. sqlalchemy/sql/_py_util.py +75 -0
  191. sqlalchemy/sql/_selectable_constructors.py +763 -0
  192. sqlalchemy/sql/_typing.py +482 -0
  193. sqlalchemy/sql/annotation.py +587 -0
  194. sqlalchemy/sql/base.py +2293 -0
  195. sqlalchemy/sql/cache_key.py +1057 -0
  196. sqlalchemy/sql/coercions.py +1404 -0
  197. sqlalchemy/sql/compiler.py +8081 -0
  198. sqlalchemy/sql/crud.py +1752 -0
  199. sqlalchemy/sql/ddl.py +1444 -0
  200. sqlalchemy/sql/default_comparator.py +551 -0
  201. sqlalchemy/sql/dml.py +1850 -0
  202. sqlalchemy/sql/elements.py +5589 -0
  203. sqlalchemy/sql/events.py +458 -0
  204. sqlalchemy/sql/expression.py +159 -0
  205. sqlalchemy/sql/functions.py +2158 -0
  206. sqlalchemy/sql/lambdas.py +1442 -0
  207. sqlalchemy/sql/naming.py +209 -0
  208. sqlalchemy/sql/operators.py +2623 -0
  209. sqlalchemy/sql/roles.py +323 -0
  210. sqlalchemy/sql/schema.py +6222 -0
  211. sqlalchemy/sql/selectable.py +7265 -0
  212. sqlalchemy/sql/sqltypes.py +3930 -0
  213. sqlalchemy/sql/traversals.py +1024 -0
  214. sqlalchemy/sql/type_api.py +2368 -0
  215. sqlalchemy/sql/util.py +1485 -0
  216. sqlalchemy/sql/visitors.py +1164 -0
  217. sqlalchemy/testing/__init__.py +96 -0
  218. sqlalchemy/testing/assertions.py +994 -0
  219. sqlalchemy/testing/assertsql.py +520 -0
  220. sqlalchemy/testing/asyncio.py +135 -0
  221. sqlalchemy/testing/config.py +434 -0
  222. sqlalchemy/testing/engines.py +483 -0
  223. sqlalchemy/testing/entities.py +117 -0
  224. sqlalchemy/testing/exclusions.py +476 -0
  225. sqlalchemy/testing/fixtures/__init__.py +28 -0
  226. sqlalchemy/testing/fixtures/base.py +384 -0
  227. sqlalchemy/testing/fixtures/mypy.py +332 -0
  228. sqlalchemy/testing/fixtures/orm.py +227 -0
  229. sqlalchemy/testing/fixtures/sql.py +482 -0
  230. sqlalchemy/testing/pickleable.py +155 -0
  231. sqlalchemy/testing/plugin/__init__.py +6 -0
  232. sqlalchemy/testing/plugin/bootstrap.py +51 -0
  233. sqlalchemy/testing/plugin/plugin_base.py +828 -0
  234. sqlalchemy/testing/plugin/pytestplugin.py +892 -0
  235. sqlalchemy/testing/profiling.py +329 -0
  236. sqlalchemy/testing/provision.py +603 -0
  237. sqlalchemy/testing/requirements.py +1945 -0
  238. sqlalchemy/testing/schema.py +198 -0
  239. sqlalchemy/testing/suite/__init__.py +19 -0
  240. sqlalchemy/testing/suite/test_cte.py +237 -0
  241. sqlalchemy/testing/suite/test_ddl.py +389 -0
  242. sqlalchemy/testing/suite/test_deprecations.py +153 -0
  243. sqlalchemy/testing/suite/test_dialect.py +776 -0
  244. sqlalchemy/testing/suite/test_insert.py +630 -0
  245. sqlalchemy/testing/suite/test_reflection.py +3557 -0
  246. sqlalchemy/testing/suite/test_results.py +504 -0
  247. sqlalchemy/testing/suite/test_rowcount.py +258 -0
  248. sqlalchemy/testing/suite/test_select.py +2010 -0
  249. sqlalchemy/testing/suite/test_sequence.py +317 -0
  250. sqlalchemy/testing/suite/test_types.py +2147 -0
  251. sqlalchemy/testing/suite/test_unicode_ddl.py +189 -0
  252. sqlalchemy/testing/suite/test_update_delete.py +139 -0
  253. sqlalchemy/testing/util.py +535 -0
  254. sqlalchemy/testing/warnings.py +52 -0
  255. sqlalchemy/types.py +74 -0
  256. sqlalchemy/util/__init__.py +162 -0
  257. sqlalchemy/util/_collections.py +712 -0
  258. sqlalchemy/util/_concurrency_py3k.py +288 -0
  259. sqlalchemy/util/_has_cy.py +40 -0
  260. sqlalchemy/util/_py_collections.py +541 -0
  261. sqlalchemy/util/compat.py +421 -0
  262. sqlalchemy/util/concurrency.py +110 -0
  263. sqlalchemy/util/deprecations.py +401 -0
  264. sqlalchemy/util/langhelpers.py +2203 -0
  265. sqlalchemy/util/preloaded.py +150 -0
  266. sqlalchemy/util/queue.py +322 -0
  267. sqlalchemy/util/tool_support.py +201 -0
  268. sqlalchemy/util/topological.py +120 -0
  269. sqlalchemy/util/typing.py +734 -0
  270. sqlalchemy-2.0.47.dist-info/METADATA +243 -0
  271. sqlalchemy-2.0.47.dist-info/RECORD +274 -0
  272. sqlalchemy-2.0.47.dist-info/WHEEL +5 -0
  273. sqlalchemy-2.0.47.dist-info/licenses/LICENSE +19 -0
  274. sqlalchemy-2.0.47.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1945 @@
1
+ # testing/requirements.py
2
+ # Copyright (C) 2005-2026 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
+
10
+ """Global database feature support policy.
11
+
12
+ Provides decorators to mark tests requiring specific feature support from the
13
+ target database.
14
+
15
+ External dialect test suites should subclass SuiteRequirements
16
+ to provide specific inclusion/exclusions.
17
+
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ import os
23
+ import platform
24
+
25
+ from . import asyncio as _test_asyncio
26
+ from . import exclusions
27
+ from .exclusions import only_on
28
+ from .. import create_engine
29
+ from .. import util
30
+ from ..pool import QueuePool
31
+
32
+
33
+ class Requirements:
34
+ pass
35
+
36
+
37
+ class SuiteRequirements(Requirements):
38
+ @property
39
+ def create_table(self):
40
+ """target platform can emit basic CreateTable DDL."""
41
+
42
+ return exclusions.open()
43
+
44
+ @property
45
+ def drop_table(self):
46
+ """target platform can emit basic DropTable DDL."""
47
+
48
+ return exclusions.open()
49
+
50
+ @property
51
+ def table_ddl_if_exists(self):
52
+ """target platform supports IF NOT EXISTS / IF EXISTS for tables."""
53
+
54
+ return exclusions.closed()
55
+
56
+ @property
57
+ def index_ddl_if_exists(self):
58
+ """target platform supports IF NOT EXISTS / IF EXISTS for indexes."""
59
+
60
+ return exclusions.closed()
61
+
62
+ @property
63
+ def uuid_data_type(self):
64
+ """Return databases that support the UUID datatype."""
65
+
66
+ return exclusions.closed()
67
+
68
+ @property
69
+ def foreign_keys(self):
70
+ """Target database must support foreign keys."""
71
+
72
+ return exclusions.open()
73
+
74
+ @property
75
+ def foreign_keys_reflect_as_index(self):
76
+ """Target database creates an index that's reflected for
77
+ foreign keys."""
78
+
79
+ return exclusions.closed()
80
+
81
+ @property
82
+ def unique_index_reflect_as_unique_constraints(self):
83
+ """Target database reflects unique indexes as unique constrains."""
84
+
85
+ return exclusions.closed()
86
+
87
+ @property
88
+ def unique_constraints_reflect_as_index(self):
89
+ """Target database reflects unique constraints as indexes."""
90
+
91
+ return exclusions.closed()
92
+
93
+ @property
94
+ def table_value_constructor(self):
95
+ """Database / dialect supports a query like:
96
+
97
+ .. sourcecode:: sql
98
+
99
+ SELECT * FROM VALUES ( (c1, c2), (c1, c2), ...)
100
+ AS some_table(col1, col2)
101
+
102
+ SQLAlchemy generates this with the :func:`_sql.values` function.
103
+
104
+ """
105
+ return exclusions.closed()
106
+
107
+ @property
108
+ def standard_cursor_sql(self):
109
+ """Target database passes SQL-92 style statements to cursor.execute()
110
+ when a statement like select() or insert() is run.
111
+
112
+ A very small portion of dialect-level tests will ensure that certain
113
+ conditions are present in SQL strings, and these tests use very basic
114
+ SQL that will work on any SQL-like platform in order to assert results.
115
+
116
+ It's normally a given for any pep-249 DBAPI that a statement like
117
+ "SELECT id, name FROM table WHERE some_table.id=5" will work.
118
+ However, there are dialects that don't actually produce SQL Strings
119
+ and instead may work with symbolic objects instead, or dialects that
120
+ aren't working with SQL, so for those this requirement can be marked
121
+ as excluded.
122
+
123
+ """
124
+
125
+ return exclusions.open()
126
+
127
+ @property
128
+ def on_update_cascade(self):
129
+ """target database must support ON UPDATE..CASCADE behavior in
130
+ foreign keys."""
131
+
132
+ return exclusions.open()
133
+
134
+ @property
135
+ def non_updating_cascade(self):
136
+ """target database must *not* support ON UPDATE..CASCADE behavior in
137
+ foreign keys."""
138
+ return exclusions.closed()
139
+
140
+ @property
141
+ def deferrable_fks(self):
142
+ return exclusions.closed()
143
+
144
+ @property
145
+ def on_update_or_deferrable_fks(self):
146
+ # TODO: exclusions should be composable,
147
+ # somehow only_if([x, y]) isn't working here, negation/conjunctions
148
+ # getting confused.
149
+ return exclusions.only_if(
150
+ lambda: self.on_update_cascade.enabled
151
+ or self.deferrable_fks.enabled
152
+ )
153
+
154
+ @property
155
+ def queue_pool(self):
156
+ """target database is using QueuePool"""
157
+
158
+ def go(config):
159
+ return isinstance(config.db.pool, QueuePool)
160
+
161
+ return exclusions.only_if(go)
162
+
163
+ @property
164
+ def self_referential_foreign_keys(self):
165
+ """Target database must support self-referential foreign keys."""
166
+
167
+ return exclusions.open()
168
+
169
+ @property
170
+ def foreign_key_ddl(self):
171
+ """Target database must support the DDL phrases for FOREIGN KEY."""
172
+
173
+ return exclusions.open()
174
+
175
+ @property
176
+ def named_constraints(self):
177
+ """target database must support names for constraints."""
178
+
179
+ return exclusions.open()
180
+
181
+ @property
182
+ def implicitly_named_constraints(self):
183
+ """target database must apply names to unnamed constraints."""
184
+
185
+ return exclusions.open()
186
+
187
+ @property
188
+ def unusual_column_name_characters(self):
189
+ """target database allows column names that have unusual characters
190
+ in them, such as dots, spaces, slashes, or percent signs.
191
+
192
+ The column names are as always in such a case quoted, however the
193
+ DB still needs to support those characters in the name somehow.
194
+
195
+ """
196
+ return exclusions.open()
197
+
198
+ @property
199
+ def subqueries(self):
200
+ """Target database must support subqueries."""
201
+
202
+ return exclusions.open()
203
+
204
+ @property
205
+ def offset(self):
206
+ """target database can render OFFSET, or an equivalent, in a
207
+ SELECT.
208
+ """
209
+
210
+ return exclusions.open()
211
+
212
+ @property
213
+ def bound_limit_offset(self):
214
+ """target database can render LIMIT and/or OFFSET using a bound
215
+ parameter
216
+ """
217
+
218
+ return exclusions.open()
219
+
220
+ @property
221
+ def sql_expression_limit_offset(self):
222
+ """target database can render LIMIT and/or OFFSET with a complete
223
+ SQL expression, such as one that uses the addition operator.
224
+ parameter
225
+ """
226
+
227
+ return exclusions.open()
228
+
229
+ @property
230
+ def parens_in_union_contained_select_w_limit_offset(self):
231
+ """Target database must support parenthesized SELECT in UNION
232
+ when LIMIT/OFFSET is specifically present.
233
+
234
+ E.g. (SELECT ...) UNION (SELECT ..)
235
+
236
+ This is known to fail on SQLite.
237
+
238
+ """
239
+ return exclusions.open()
240
+
241
+ @property
242
+ def parens_in_union_contained_select_wo_limit_offset(self):
243
+ """Target database must support parenthesized SELECT in UNION
244
+ when OFFSET/LIMIT is specifically not present.
245
+
246
+ E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..)
247
+
248
+ This is known to fail on SQLite. It also fails on Oracle
249
+ because without LIMIT/OFFSET, there is currently no step that
250
+ creates an additional subquery.
251
+
252
+ """
253
+ return exclusions.open()
254
+
255
+ @property
256
+ def boolean_col_expressions(self):
257
+ """Target database must support boolean expressions as columns"""
258
+
259
+ return exclusions.closed()
260
+
261
+ @property
262
+ def nullable_booleans(self):
263
+ """Target database allows boolean columns to store NULL."""
264
+
265
+ return exclusions.open()
266
+
267
+ @property
268
+ def nullsordering(self):
269
+ """Target backends that support nulls ordering."""
270
+
271
+ return exclusions.closed()
272
+
273
+ @property
274
+ def standalone_binds(self):
275
+ """target database/driver supports bound parameters as column
276
+ expressions without being in the context of a typed column.
277
+ """
278
+ return exclusions.open()
279
+
280
+ @property
281
+ def standalone_null_binds_whereclause(self):
282
+ """target database/driver supports bound parameters with NULL in the
283
+ WHERE clause, in situations where it has to be typed.
284
+
285
+ """
286
+ return exclusions.open()
287
+
288
+ @property
289
+ def intersect(self):
290
+ """Target database must support INTERSECT or equivalent."""
291
+ return exclusions.closed()
292
+
293
+ @property
294
+ def except_(self):
295
+ """Target database must support EXCEPT or equivalent (i.e. MINUS)."""
296
+ return exclusions.closed()
297
+
298
+ @property
299
+ def window_functions(self):
300
+ """Target database must support window functions."""
301
+ return exclusions.closed()
302
+
303
+ @property
304
+ def ctes(self):
305
+ """Target database supports CTEs"""
306
+
307
+ return exclusions.closed()
308
+
309
+ @property
310
+ def ctes_with_update_delete(self):
311
+ """target database supports CTES that ride on top of a normal UPDATE
312
+ or DELETE statement which refers to the CTE in a correlated subquery.
313
+
314
+ """
315
+
316
+ return exclusions.closed()
317
+
318
+ @property
319
+ def ctes_with_values(self):
320
+ """target database supports CTES that ride on top of a VALUES
321
+ clause."""
322
+
323
+ return exclusions.closed()
324
+
325
+ @property
326
+ def ctes_on_dml(self):
327
+ """target database supports CTES which consist of INSERT, UPDATE
328
+ or DELETE *within* the CTE, e.g. WITH x AS (UPDATE....)"""
329
+
330
+ return exclusions.closed()
331
+
332
+ @property
333
+ def autoincrement_insert(self):
334
+ """target platform generates new surrogate integer primary key values
335
+ when insert() is executed, excluding the pk column."""
336
+
337
+ return exclusions.open()
338
+
339
+ @property
340
+ def fetch_rows_post_commit(self):
341
+ """target platform will allow cursor.fetchone() to proceed after a
342
+ COMMIT.
343
+
344
+ Typically this refers to an INSERT statement with RETURNING which
345
+ is invoked within "autocommit". If the row can be returned
346
+ after the autocommit, then this rule can be open.
347
+
348
+ """
349
+
350
+ return exclusions.open()
351
+
352
+ @property
353
+ def group_by_complex_expression(self):
354
+ """target platform supports SQL expressions in GROUP BY
355
+
356
+ e.g.
357
+
358
+ SELECT x + y AS somelabel FROM table GROUP BY x + y
359
+
360
+ """
361
+
362
+ return exclusions.open()
363
+
364
+ @property
365
+ def sane_rowcount(self):
366
+ return exclusions.skip_if(
367
+ lambda config: not config.db.dialect.supports_sane_rowcount,
368
+ "driver doesn't support 'sane' rowcount",
369
+ )
370
+
371
+ @property
372
+ def sane_multi_rowcount(self):
373
+ return exclusions.fails_if(
374
+ lambda config: not config.db.dialect.supports_sane_multi_rowcount,
375
+ "driver %(driver)s %(doesnt_support)s 'sane' multi row count",
376
+ )
377
+
378
+ @property
379
+ def sane_rowcount_w_returning(self):
380
+ return exclusions.fails_if(
381
+ lambda config: not (
382
+ config.db.dialect.supports_sane_rowcount_returning
383
+ ),
384
+ "driver doesn't support 'sane' rowcount when returning is on",
385
+ )
386
+
387
+ @property
388
+ def empty_inserts(self):
389
+ """target platform supports INSERT with no values, i.e.
390
+ INSERT DEFAULT VALUES or equivalent."""
391
+
392
+ return exclusions.only_if(
393
+ lambda config: config.db.dialect.supports_empty_insert
394
+ or config.db.dialect.supports_default_values
395
+ or config.db.dialect.supports_default_metavalue,
396
+ "empty inserts not supported",
397
+ )
398
+
399
+ @property
400
+ def empty_inserts_executemany(self):
401
+ """target platform supports INSERT with no values, i.e.
402
+ INSERT DEFAULT VALUES or equivalent, within executemany()"""
403
+
404
+ return self.empty_inserts
405
+
406
+ @property
407
+ def insert_from_select(self):
408
+ """target platform supports INSERT from a SELECT."""
409
+
410
+ return exclusions.open()
411
+
412
+ @property
413
+ def delete_returning(self):
414
+ """target platform supports DELETE ... RETURNING."""
415
+
416
+ return exclusions.only_if(
417
+ lambda config: config.db.dialect.delete_returning,
418
+ "%(database)s %(does_support)s 'DELETE ... RETURNING'",
419
+ )
420
+
421
+ @property
422
+ def insert_returning(self):
423
+ """target platform supports INSERT ... RETURNING."""
424
+
425
+ return exclusions.only_if(
426
+ lambda config: config.db.dialect.insert_returning,
427
+ "%(database)s %(does_support)s 'INSERT ... RETURNING'",
428
+ )
429
+
430
+ @property
431
+ def update_returning(self):
432
+ """target platform supports UPDATE ... RETURNING."""
433
+
434
+ return exclusions.only_if(
435
+ lambda config: config.db.dialect.update_returning,
436
+ "%(database)s %(does_support)s 'UPDATE ... RETURNING'",
437
+ )
438
+
439
+ @property
440
+ def insert_executemany_returning(self):
441
+ """target platform supports RETURNING when INSERT is used with
442
+ executemany(), e.g. multiple parameter sets, indicating
443
+ as many rows come back as do parameter sets were passed.
444
+
445
+ """
446
+
447
+ return exclusions.only_if(
448
+ lambda config: config.db.dialect.insert_executemany_returning,
449
+ "%(database)s %(does_support)s 'RETURNING of "
450
+ "multiple rows with INSERT executemany'",
451
+ )
452
+
453
+ @property
454
+ def insertmanyvalues(self):
455
+ return exclusions.only_if(
456
+ lambda config: config.db.dialect.supports_multivalues_insert
457
+ and config.db.dialect.insert_returning
458
+ and config.db.dialect.use_insertmanyvalues,
459
+ "%(database)s %(does_support)s 'insertmanyvalues functionality",
460
+ )
461
+
462
+ @property
463
+ def tuple_in(self):
464
+ """Target platform supports the syntax
465
+ "(x, y) IN ((x1, y1), (x2, y2), ...)"
466
+ """
467
+
468
+ return exclusions.closed()
469
+
470
+ @property
471
+ def tuple_in_w_empty(self):
472
+ """Target platform tuple IN w/ empty set"""
473
+ return self.tuple_in
474
+
475
+ @property
476
+ def duplicate_names_in_cursor_description(self):
477
+ """target platform supports a SELECT statement that has
478
+ the same name repeated more than once in the columns list."""
479
+
480
+ return exclusions.open()
481
+
482
+ @property
483
+ def denormalized_names(self):
484
+ """Target database must have 'denormalized', i.e.
485
+ UPPERCASE as case insensitive names."""
486
+
487
+ return exclusions.skip_if(
488
+ lambda config: not config.db.dialect.requires_name_normalize,
489
+ "Backend does not require denormalized names.",
490
+ )
491
+
492
+ @property
493
+ def multivalues_inserts(self):
494
+ """target database must support multiple VALUES clauses in an
495
+ INSERT statement."""
496
+
497
+ return exclusions.skip_if(
498
+ lambda config: not config.db.dialect.supports_multivalues_insert,
499
+ "Backend does not support multirow inserts.",
500
+ )
501
+
502
+ @property
503
+ def implements_get_lastrowid(self):
504
+ """target dialect implements the executioncontext.get_lastrowid()
505
+ method without reliance on RETURNING.
506
+
507
+ """
508
+ return exclusions.open()
509
+
510
+ @property
511
+ def arraysize(self):
512
+ """dialect includes the required pep-249 attribute
513
+ ``cursor.arraysize``"""
514
+
515
+ return exclusions.open()
516
+
517
+ @property
518
+ def emulated_lastrowid(self):
519
+ """target dialect retrieves cursor.lastrowid, or fetches
520
+ from a database-side function after an insert() construct executes,
521
+ within the get_lastrowid() method.
522
+
523
+ Only dialects that "pre-execute", or need RETURNING to get last
524
+ inserted id, would return closed/fail/skip for this.
525
+
526
+ """
527
+ return exclusions.closed()
528
+
529
+ @property
530
+ def emulated_lastrowid_even_with_sequences(self):
531
+ """target dialect retrieves cursor.lastrowid or an equivalent
532
+ after an insert() construct executes, even if the table has a
533
+ Sequence on it.
534
+
535
+ """
536
+ return exclusions.closed()
537
+
538
+ @property
539
+ def dbapi_lastrowid(self):
540
+ """target platform includes a 'lastrowid' accessor on the DBAPI
541
+ cursor object.
542
+
543
+ """
544
+ return exclusions.closed()
545
+
546
+ @property
547
+ def views(self):
548
+ """Target database must support VIEWs."""
549
+
550
+ return exclusions.closed()
551
+
552
+ @property
553
+ def schemas(self):
554
+ """Target database must support external schemas, and have one
555
+ named 'test_schema'."""
556
+
557
+ return only_on(lambda config: config.db.dialect.supports_schemas)
558
+
559
+ @property
560
+ def cross_schema_fk_reflection(self):
561
+ """target system must support reflection of inter-schema
562
+ foreign keys"""
563
+ return exclusions.closed()
564
+
565
+ @property
566
+ def foreign_key_constraint_name_reflection(self):
567
+ """Target supports reflection of FOREIGN KEY constraints and
568
+ will return the name of the constraint that was used in the
569
+ "CONSTRAINT <name> FOREIGN KEY" DDL.
570
+
571
+ MySQL prior to version 8 and MariaDB prior to version 10.5
572
+ don't support this.
573
+
574
+ """
575
+ return exclusions.closed()
576
+
577
+ @property
578
+ def implicit_default_schema(self):
579
+ """target system has a strong concept of 'default' schema that can
580
+ be referred to implicitly.
581
+
582
+ basically, PostgreSQL.
583
+
584
+ """
585
+ return exclusions.closed()
586
+
587
+ @property
588
+ def default_schema_name_switch(self):
589
+ """target dialect implements provisioning module including
590
+ set_default_schema_on_connection"""
591
+
592
+ return exclusions.closed()
593
+
594
+ @property
595
+ def server_side_cursors(self):
596
+ """Target dialect must support server side cursors."""
597
+
598
+ return exclusions.only_if(
599
+ [lambda config: config.db.dialect.supports_server_side_cursors],
600
+ "no server side cursors support",
601
+ )
602
+
603
+ @property
604
+ def sequences(self):
605
+ """Target database must support SEQUENCEs."""
606
+
607
+ return exclusions.only_if(
608
+ [lambda config: config.db.dialect.supports_sequences],
609
+ "no sequence support",
610
+ )
611
+
612
+ @property
613
+ def no_sequences(self):
614
+ """the opposite of "sequences", DB does not support sequences at
615
+ all."""
616
+
617
+ return exclusions.NotPredicate(self.sequences)
618
+
619
+ @property
620
+ def sequences_optional(self):
621
+ """Target database supports sequences, but also optionally
622
+ as a means of generating new PK values."""
623
+
624
+ return exclusions.only_if(
625
+ [
626
+ lambda config: config.db.dialect.supports_sequences
627
+ and config.db.dialect.sequences_optional
628
+ ],
629
+ "no sequence support, or sequences not optional",
630
+ )
631
+
632
+ @property
633
+ def supports_lastrowid(self):
634
+ """target database / driver supports cursor.lastrowid as a means
635
+ of retrieving the last inserted primary key value.
636
+
637
+ note that if the target DB supports sequences also, this is still
638
+ assumed to work. This is a new use case brought on by MariaDB 10.3.
639
+
640
+ """
641
+ return exclusions.only_if(
642
+ [lambda config: config.db.dialect.postfetch_lastrowid]
643
+ )
644
+
645
+ @property
646
+ def no_lastrowid_support(self):
647
+ """the opposite of supports_lastrowid"""
648
+ return exclusions.only_if(
649
+ [lambda config: not config.db.dialect.postfetch_lastrowid]
650
+ )
651
+
652
+ @property
653
+ def reflects_pk_names(self):
654
+ return exclusions.closed()
655
+
656
+ @property
657
+ def table_reflection(self):
658
+ """target database has general support for table reflection"""
659
+ return exclusions.open()
660
+
661
+ @property
662
+ def reflect_tables_no_columns(self):
663
+ """target database supports creation and reflection of tables with no
664
+ columns, or at least tables that seem to have no columns."""
665
+
666
+ return exclusions.closed()
667
+
668
+ @property
669
+ def temp_table_comment_reflection(self):
670
+ """indicates if database supports comments on temp tables and
671
+ the dialect can reflect them"""
672
+ return exclusions.closed()
673
+
674
+ @property
675
+ def comment_reflection(self):
676
+ """Indicates if the database support table comment reflection"""
677
+ return exclusions.closed()
678
+
679
+ @property
680
+ def comment_reflection_full_unicode(self):
681
+ """Indicates if the database support table comment reflection in the
682
+ full unicode range, including emoji etc.
683
+ """
684
+ return exclusions.closed()
685
+
686
+ @property
687
+ def constraint_comment_reflection(self):
688
+ """indicates if the database support comments on constraints
689
+ and their reflection"""
690
+ return exclusions.closed()
691
+
692
+ @property
693
+ def column_collation_reflection(self):
694
+ """Indicates if the database support column collation reflection.
695
+
696
+ This requirement also uses ``get_order_by_collation`` to get
697
+ an available collation.
698
+ """
699
+ return exclusions.closed()
700
+
701
+ @property
702
+ def view_column_reflection(self):
703
+ """target database must support retrieval of the columns in a view,
704
+ similarly to how a table is inspected.
705
+
706
+ This does not include the full CREATE VIEW definition.
707
+
708
+ """
709
+ return self.views
710
+
711
+ @property
712
+ def view_reflection(self):
713
+ """target database must support inspection of the full CREATE VIEW
714
+ definition."""
715
+ return self.views
716
+
717
+ @property
718
+ def schema_reflection(self):
719
+ return self.schemas
720
+
721
+ @property
722
+ def schema_create_delete(self):
723
+ """target database supports schema create and dropped with
724
+ 'CREATE SCHEMA' and 'DROP SCHEMA'"""
725
+ return exclusions.closed()
726
+
727
+ @property
728
+ def primary_key_constraint_reflection(self):
729
+ return exclusions.open()
730
+
731
+ @property
732
+ def foreign_key_constraint_reflection(self):
733
+ return exclusions.open()
734
+
735
+ @property
736
+ def foreign_key_constraint_option_reflection_ondelete(self):
737
+ return exclusions.closed()
738
+
739
+ @property
740
+ def fk_constraint_option_reflection_ondelete_restrict(self):
741
+ return exclusions.closed()
742
+
743
+ @property
744
+ def fk_constraint_option_reflection_ondelete_noaction(self):
745
+ return exclusions.closed()
746
+
747
+ @property
748
+ def foreign_key_constraint_option_reflection_onupdate(self):
749
+ return exclusions.closed()
750
+
751
+ @property
752
+ def fk_constraint_option_reflection_onupdate_restrict(self):
753
+ return exclusions.closed()
754
+
755
+ @property
756
+ def temp_table_reflection(self):
757
+ return exclusions.open()
758
+
759
+ @property
760
+ def temp_table_reflect_indexes(self):
761
+ return self.temp_table_reflection
762
+
763
+ @property
764
+ def temp_table_names(self):
765
+ """target dialect supports listing of temporary table names"""
766
+ return exclusions.closed()
767
+
768
+ @property
769
+ def has_temp_table(self):
770
+ """target dialect supports checking a single temp table name"""
771
+ return exclusions.closed()
772
+
773
+ @property
774
+ def temporary_tables(self):
775
+ """target database supports temporary tables"""
776
+ return exclusions.open()
777
+
778
+ @property
779
+ def temporary_views(self):
780
+ """target database supports temporary views"""
781
+ return exclusions.closed()
782
+
783
+ @property
784
+ def index_reflection(self):
785
+ return exclusions.open()
786
+
787
+ @property
788
+ def index_reflects_included_columns(self):
789
+ return exclusions.closed()
790
+
791
+ @property
792
+ def indexes_with_ascdesc(self):
793
+ """target database supports CREATE INDEX with per-column ASC/DESC."""
794
+ return exclusions.open()
795
+
796
+ @property
797
+ def reflect_indexes_with_ascdesc(self):
798
+ """target database supports reflecting INDEX with per-column
799
+ ASC/DESC."""
800
+ return exclusions.open()
801
+
802
+ @property
803
+ def reflect_indexes_with_ascdesc_as_expression(self):
804
+ """target database supports reflecting INDEX with per-column
805
+ ASC/DESC but reflects them as expressions (like oracle)."""
806
+ return exclusions.closed()
807
+
808
+ @property
809
+ def indexes_check_column_order(self):
810
+ """target database supports CREATE INDEX with column order check."""
811
+ return exclusions.closed()
812
+
813
+ @property
814
+ def indexes_with_expressions(self):
815
+ """target database supports CREATE INDEX against SQL expressions."""
816
+ return exclusions.closed()
817
+
818
+ @property
819
+ def reflect_indexes_with_expressions(self):
820
+ """target database supports reflection of indexes with
821
+ SQL expressions."""
822
+ return exclusions.closed()
823
+
824
+ @property
825
+ def unique_constraint_reflection(self):
826
+ """target dialect supports reflection of unique constraints"""
827
+ return exclusions.open()
828
+
829
+ @property
830
+ def inline_check_constraint_reflection(self):
831
+ """target dialect supports reflection of inline check constraints"""
832
+ return exclusions.closed()
833
+
834
+ @property
835
+ def check_constraint_reflection(self):
836
+ """target dialect supports reflection of check constraints"""
837
+ return exclusions.closed()
838
+
839
+ @property
840
+ def duplicate_key_raises_integrity_error(self):
841
+ """target dialect raises IntegrityError when reporting an INSERT
842
+ with a primary key violation. (hint: it should)
843
+
844
+ """
845
+ return exclusions.open()
846
+
847
+ @property
848
+ def unbounded_varchar(self):
849
+ """Target database must support VARCHAR with no length"""
850
+
851
+ return exclusions.open()
852
+
853
+ @property
854
+ def nvarchar_types(self):
855
+ """target database supports NVARCHAR and NCHAR as an actual datatype"""
856
+ return exclusions.closed()
857
+
858
+ @property
859
+ def unicode_data_no_special_types(self):
860
+ """Target database/dialect can receive / deliver / compare data with
861
+ non-ASCII characters in plain VARCHAR, TEXT columns, without the need
862
+ for special "national" datatypes like NVARCHAR or similar.
863
+
864
+ """
865
+ return exclusions.open()
866
+
867
+ @property
868
+ def unicode_data(self):
869
+ """Target database/dialect must support Python unicode objects with
870
+ non-ASCII characters represented, delivered as bound parameters
871
+ as well as in result rows.
872
+
873
+ """
874
+ return exclusions.open()
875
+
876
+ @property
877
+ def unicode_ddl(self):
878
+ """Target driver must support some degree of non-ascii symbol
879
+ names.
880
+ """
881
+ return exclusions.closed()
882
+
883
+ @property
884
+ def symbol_names_w_double_quote(self):
885
+ """Target driver can create tables with a name like 'some " table'"""
886
+ return exclusions.open()
887
+
888
+ @property
889
+ def datetime_interval(self):
890
+ """target dialect supports rendering of a datetime.timedelta as a
891
+ literal string, e.g. via the TypeEngine.literal_processor() method.
892
+
893
+ """
894
+ return exclusions.closed()
895
+
896
+ @property
897
+ def datetime_literals(self):
898
+ """target dialect supports rendering of a date, time, or datetime as a
899
+ literal string, e.g. via the TypeEngine.literal_processor() method.
900
+
901
+ """
902
+
903
+ return exclusions.closed()
904
+
905
+ @property
906
+ def datetime(self):
907
+ """target dialect supports representation of Python
908
+ datetime.datetime() objects."""
909
+
910
+ return exclusions.open()
911
+
912
+ @property
913
+ def datetime_timezone(self):
914
+ """target dialect supports representation of Python
915
+ datetime.datetime() with tzinfo with DateTime(timezone=True)."""
916
+
917
+ return exclusions.closed()
918
+
919
+ @property
920
+ def time_timezone(self):
921
+ """target dialect supports representation of Python
922
+ datetime.time() with tzinfo with Time(timezone=True)."""
923
+
924
+ return exclusions.closed()
925
+
926
+ @property
927
+ def date_implicit_bound(self):
928
+ """target dialect when given a date object will bind it such
929
+ that the database server knows the object is a date, and not
930
+ a plain string.
931
+
932
+ """
933
+ return exclusions.open()
934
+
935
+ @property
936
+ def time_implicit_bound(self):
937
+ """target dialect when given a time object will bind it such
938
+ that the database server knows the object is a time, and not
939
+ a plain string.
940
+
941
+ """
942
+ return exclusions.open()
943
+
944
+ @property
945
+ def datetime_implicit_bound(self):
946
+ """target dialect when given a datetime object will bind it such
947
+ that the database server knows the object is a datetime, and not
948
+ a plain string.
949
+
950
+ """
951
+ return exclusions.open()
952
+
953
+ @property
954
+ def datetime_microseconds(self):
955
+ """target dialect supports representation of Python
956
+ datetime.datetime() with microsecond objects."""
957
+
958
+ return exclusions.open()
959
+
960
+ @property
961
+ def timestamp_microseconds(self):
962
+ """target dialect supports representation of Python
963
+ datetime.datetime() with microsecond objects but only
964
+ if TIMESTAMP is used."""
965
+ return exclusions.closed()
966
+
967
+ @property
968
+ def timestamp_microseconds_implicit_bound(self):
969
+ """target dialect when given a datetime object which also includes
970
+ a microseconds portion when using the TIMESTAMP data type
971
+ will bind it such that the database server knows
972
+ the object is a datetime with microseconds, and not a plain string.
973
+
974
+ """
975
+ return self.timestamp_microseconds
976
+
977
+ @property
978
+ def datetime_historic(self):
979
+ """target dialect supports representation of Python
980
+ datetime.datetime() objects with historic (pre 1970) values."""
981
+
982
+ return exclusions.closed()
983
+
984
+ @property
985
+ def date(self):
986
+ """target dialect supports representation of Python
987
+ datetime.date() objects."""
988
+
989
+ return exclusions.open()
990
+
991
+ @property
992
+ def date_coerces_from_datetime(self):
993
+ """target dialect accepts a datetime object as the target
994
+ of a date column."""
995
+
996
+ return exclusions.open()
997
+
998
+ @property
999
+ def date_historic(self):
1000
+ """target dialect supports representation of Python
1001
+ datetime.datetime() objects with historic (pre 1970) values."""
1002
+
1003
+ return exclusions.closed()
1004
+
1005
+ @property
1006
+ def time(self):
1007
+ """target dialect supports representation of Python
1008
+ datetime.time() objects."""
1009
+
1010
+ return exclusions.open()
1011
+
1012
+ @property
1013
+ def time_microseconds(self):
1014
+ """target dialect supports representation of Python
1015
+ datetime.time() with microsecond objects."""
1016
+
1017
+ return exclusions.open()
1018
+
1019
+ @property
1020
+ def binary_comparisons(self):
1021
+ """target database/driver can allow BLOB/BINARY fields to be compared
1022
+ against a bound parameter value.
1023
+ """
1024
+
1025
+ return exclusions.open()
1026
+
1027
+ @property
1028
+ def binary_literals(self):
1029
+ """target backend supports simple binary literals, e.g. an
1030
+ expression like:
1031
+
1032
+ .. sourcecode:: sql
1033
+
1034
+ SELECT CAST('foo' AS BINARY)
1035
+
1036
+ Where ``BINARY`` is the type emitted from :class:`.LargeBinary`,
1037
+ e.g. it could be ``BLOB`` or similar.
1038
+
1039
+ Basically fails on Oracle.
1040
+
1041
+ """
1042
+
1043
+ return exclusions.open()
1044
+
1045
+ @property
1046
+ def autocommit(self):
1047
+ """target dialect supports 'AUTOCOMMIT' as an isolation_level"""
1048
+ return exclusions.closed()
1049
+
1050
+ @property
1051
+ def skip_autocommit_rollback(self):
1052
+ """target dialect supports the detect_autocommit_setting() method and
1053
+ uses the default implementation of do_rollback()"""
1054
+
1055
+ return exclusions.closed()
1056
+
1057
+ @property
1058
+ def isolation_level(self):
1059
+ """target dialect supports general isolation level settings.
1060
+
1061
+ Note that this requirement, when enabled, also requires that
1062
+ the get_isolation_levels() method be implemented.
1063
+
1064
+ """
1065
+ return exclusions.closed()
1066
+
1067
+ def get_isolation_levels(self, config):
1068
+ """Return a structure of supported isolation levels for the current
1069
+ testing dialect.
1070
+
1071
+ The structure indicates to the testing suite what the expected
1072
+ "default" isolation should be, as well as the other values that
1073
+ are accepted. The dictionary has two keys, "default" and "supported".
1074
+ The "supported" key refers to a list of all supported levels and
1075
+ it should include AUTOCOMMIT if the dialect supports it.
1076
+
1077
+ If the :meth:`.DefaultRequirements.isolation_level` requirement is
1078
+ not open, then this method has no return value.
1079
+
1080
+ E.g.::
1081
+
1082
+ >>> testing.requirements.get_isolation_levels()
1083
+ {
1084
+ "default": "READ_COMMITTED",
1085
+ "supported": [
1086
+ "SERIALIZABLE", "READ UNCOMMITTED",
1087
+ "READ COMMITTED", "REPEATABLE READ",
1088
+ "AUTOCOMMIT"
1089
+ ]
1090
+ }
1091
+ """
1092
+ with config.db.connect() as conn:
1093
+ try:
1094
+ supported = conn.dialect.get_isolation_level_values(
1095
+ conn.connection.dbapi_connection
1096
+ )
1097
+ except NotImplementedError:
1098
+ return None
1099
+ else:
1100
+ return {
1101
+ "default": conn.dialect.default_isolation_level,
1102
+ "supported": supported,
1103
+ }
1104
+
1105
+ @property
1106
+ def get_isolation_level_values(self):
1107
+ """target dialect supports the
1108
+ :meth:`_engine.Dialect.get_isolation_level_values`
1109
+ method added in SQLAlchemy 2.0.
1110
+
1111
+ """
1112
+
1113
+ def go(config):
1114
+ with config.db.connect() as conn:
1115
+ try:
1116
+ conn.dialect.get_isolation_level_values(
1117
+ conn.connection.dbapi_connection
1118
+ )
1119
+ except NotImplementedError:
1120
+ return False
1121
+ else:
1122
+ return True
1123
+
1124
+ return exclusions.only_if(go)
1125
+
1126
+ @property
1127
+ def dialect_level_isolation_level_param(self):
1128
+ """test that the dialect allows the 'isolation_level' argument
1129
+ to be handled by DefaultDialect"""
1130
+
1131
+ def go(config):
1132
+ try:
1133
+ e = create_engine(
1134
+ config.db.url, isolation_level="READ COMMITTED"
1135
+ )
1136
+ except:
1137
+ return False
1138
+ else:
1139
+ return (
1140
+ e.dialect._on_connect_isolation_level == "READ COMMITTED"
1141
+ )
1142
+
1143
+ return exclusions.only_if(go)
1144
+
1145
+ @property
1146
+ def array_type(self):
1147
+ """Target platform implements a native ARRAY type"""
1148
+ return exclusions.closed()
1149
+
1150
+ @property
1151
+ def json_type(self):
1152
+ """target platform implements a native JSON type."""
1153
+
1154
+ return exclusions.closed()
1155
+
1156
+ @property
1157
+ def json_array_indexes(self):
1158
+ """target platform supports numeric array indexes
1159
+ within a JSON structure"""
1160
+
1161
+ return self.json_type
1162
+
1163
+ @property
1164
+ def json_index_supplementary_unicode_element(self):
1165
+ return exclusions.open()
1166
+
1167
+ @property
1168
+ def legacy_unconditional_json_extract(self):
1169
+ """Backend has a JSON_EXTRACT or similar function that returns a
1170
+ valid JSON string in all cases.
1171
+
1172
+ Used to test a legacy feature and is not needed.
1173
+
1174
+ """
1175
+ return exclusions.closed()
1176
+
1177
+ @property
1178
+ def precision_numerics_general(self):
1179
+ """target backend has general support for moderately high-precision
1180
+ numerics."""
1181
+ return exclusions.open()
1182
+
1183
+ @property
1184
+ def precision_numerics_enotation_small(self):
1185
+ """target backend supports Decimal() objects using E notation
1186
+ to represent very small values."""
1187
+ return exclusions.closed()
1188
+
1189
+ @property
1190
+ def precision_numerics_enotation_large(self):
1191
+ """target backend supports Decimal() objects using E notation
1192
+ to represent very large values."""
1193
+ return exclusions.open()
1194
+
1195
+ @property
1196
+ def precision_numerics_many_significant_digits(self):
1197
+ """target backend supports values with many digits on both sides,
1198
+ such as 319438950232418390.273596, 87673.594069654243
1199
+
1200
+ """
1201
+ return exclusions.closed()
1202
+
1203
+ @property
1204
+ def cast_precision_numerics_many_significant_digits(self):
1205
+ """same as precision_numerics_many_significant_digits but within the
1206
+ context of a CAST statement (hello MySQL)
1207
+
1208
+ """
1209
+ return self.precision_numerics_many_significant_digits
1210
+
1211
+ @property
1212
+ def server_defaults(self):
1213
+ """Target backend supports server side defaults for columns"""
1214
+
1215
+ return exclusions.closed()
1216
+
1217
+ @property
1218
+ def expression_server_defaults(self):
1219
+ """Target backend supports server side defaults with SQL expressions
1220
+ for columns"""
1221
+
1222
+ return exclusions.closed()
1223
+
1224
+ @property
1225
+ def implicit_decimal_binds(self):
1226
+ """target backend will return a selected Decimal as a Decimal, not
1227
+ a string.
1228
+
1229
+ e.g.::
1230
+
1231
+ expr = decimal.Decimal("15.7563")
1232
+
1233
+ value = e.scalar(select(literal(expr)))
1234
+
1235
+ assert value == expr
1236
+
1237
+ See :ticket:`4036`
1238
+
1239
+ """
1240
+
1241
+ return exclusions.open()
1242
+
1243
+ @property
1244
+ def numeric_received_as_decimal_untyped(self):
1245
+ """target backend will return result columns that are explicitly
1246
+ against NUMERIC or similar precision-numeric datatypes (not including
1247
+ FLOAT or INT types) as Python Decimal objects, and not as floats
1248
+ or ints, including when no SQLAlchemy-side typing information is
1249
+ associated with the statement (e.g. such as a raw SQL string).
1250
+
1251
+ This should be enabled if either the DBAPI itself returns Decimal
1252
+ objects, or if the dialect has set up DBAPI-specific return type
1253
+ handlers such that Decimal objects come back automatically.
1254
+
1255
+ """
1256
+ return exclusions.open()
1257
+
1258
+ @property
1259
+ def nested_aggregates(self):
1260
+ """target database can select an aggregate from a subquery that's
1261
+ also using an aggregate
1262
+
1263
+ """
1264
+ return exclusions.open()
1265
+
1266
+ @property
1267
+ def recursive_fk_cascade(self):
1268
+ """target database must support ON DELETE CASCADE on a self-referential
1269
+ foreign key
1270
+
1271
+ """
1272
+ return exclusions.open()
1273
+
1274
+ @property
1275
+ def precision_numerics_retains_significant_digits(self):
1276
+ """A precision numeric type will return empty significant digits,
1277
+ i.e. a value such as 10.000 will come back in Decimal form with
1278
+ the .000 maintained."""
1279
+
1280
+ return exclusions.closed()
1281
+
1282
+ @property
1283
+ def infinity_floats(self):
1284
+ """The Float type can persist and load float('inf'), float('-inf')."""
1285
+
1286
+ return exclusions.closed()
1287
+
1288
+ @property
1289
+ def float_or_double_precision_behaves_generically(self):
1290
+ return exclusions.closed()
1291
+
1292
+ @property
1293
+ def precision_generic_float_type(self):
1294
+ """target backend will return native floating point numbers with at
1295
+ least seven decimal places when using the generic Float type.
1296
+
1297
+ """
1298
+ return exclusions.open()
1299
+
1300
+ @property
1301
+ def literal_float_coercion(self):
1302
+ """target backend will return the exact float value 15.7563
1303
+ with only four significant digits from this statement:
1304
+
1305
+ SELECT :param
1306
+
1307
+ where :param is the Python float 15.7563
1308
+
1309
+ i.e. it does not return 15.75629997253418
1310
+
1311
+ """
1312
+ return exclusions.open()
1313
+
1314
+ @property
1315
+ def floats_to_four_decimals(self):
1316
+ """target backend can return a floating-point number with four
1317
+ significant digits (such as 15.7563) accurately
1318
+ (i.e. without FP inaccuracies, such as 15.75629997253418).
1319
+
1320
+ """
1321
+ return exclusions.open()
1322
+
1323
+ @property
1324
+ def fetch_null_from_numeric(self):
1325
+ """target backend doesn't crash when you try to select a NUMERIC
1326
+ value that has a value of NULL.
1327
+
1328
+ Added to support Pyodbc bug #351.
1329
+ """
1330
+
1331
+ return exclusions.open()
1332
+
1333
+ @property
1334
+ def float_is_numeric(self):
1335
+ """target backend uses Numeric for Float/Dual"""
1336
+
1337
+ return exclusions.open()
1338
+
1339
+ @property
1340
+ def text_type(self):
1341
+ """Target database must support an unbounded Text() "
1342
+ "type such as TEXT or CLOB"""
1343
+
1344
+ return exclusions.open()
1345
+
1346
+ @property
1347
+ def empty_strings_varchar(self):
1348
+ """target database can persist/return an empty string with a
1349
+ varchar.
1350
+
1351
+ """
1352
+ return exclusions.open()
1353
+
1354
+ @property
1355
+ def empty_strings_text(self):
1356
+ """target database can persist/return an empty string with an
1357
+ unbounded text."""
1358
+
1359
+ return exclusions.open()
1360
+
1361
+ @property
1362
+ def expressions_against_unbounded_text(self):
1363
+ """target database supports use of an unbounded textual field in a
1364
+ WHERE clause."""
1365
+
1366
+ return exclusions.open()
1367
+
1368
+ @property
1369
+ def selectone(self):
1370
+ """target driver must support the literal statement 'select 1'"""
1371
+ return exclusions.open()
1372
+
1373
+ @property
1374
+ def savepoints(self):
1375
+ """Target database must support savepoints."""
1376
+
1377
+ return exclusions.closed()
1378
+
1379
+ @property
1380
+ def two_phase_transactions(self):
1381
+ """Target database must support two-phase transactions."""
1382
+
1383
+ return exclusions.closed()
1384
+
1385
+ @property
1386
+ def update_from(self):
1387
+ """Target must support UPDATE..FROM syntax"""
1388
+ return exclusions.closed()
1389
+
1390
+ @property
1391
+ def delete_from(self):
1392
+ """Target must support DELETE FROM..FROM or DELETE..USING syntax"""
1393
+ return exclusions.closed()
1394
+
1395
+ @property
1396
+ def update_where_target_in_subquery(self):
1397
+ """Target must support UPDATE (or DELETE) where the same table is
1398
+ present in a subquery in the WHERE clause.
1399
+
1400
+ This is an ANSI-standard syntax that apparently MySQL can't handle,
1401
+ such as:
1402
+
1403
+ .. sourcecode:: sql
1404
+
1405
+ UPDATE documents SET flag=1 WHERE documents.title IN
1406
+ (SELECT max(documents.title) AS title
1407
+ FROM documents GROUP BY documents.user_id
1408
+ )
1409
+
1410
+ """
1411
+ return exclusions.open()
1412
+
1413
+ @property
1414
+ def mod_operator_as_percent_sign(self):
1415
+ """target database must use a plain percent '%' as the 'modulus'
1416
+ operator."""
1417
+ return exclusions.closed()
1418
+
1419
+ @property
1420
+ def percent_schema_names(self):
1421
+ """target backend supports weird identifiers with percent signs
1422
+ in them, e.g. 'some % column'.
1423
+
1424
+ this is a very weird use case but often has problems because of
1425
+ DBAPIs that use python formatting. It's not a critical use
1426
+ case either.
1427
+
1428
+ """
1429
+ return exclusions.closed()
1430
+
1431
+ @property
1432
+ def order_by_col_from_union(self):
1433
+ """target database supports ordering by a column from a SELECT
1434
+ inside of a UNION
1435
+
1436
+ E.g.:
1437
+
1438
+ .. sourcecode:: sql
1439
+
1440
+ (SELECT id, ...) UNION (SELECT id, ...) ORDER BY id
1441
+
1442
+ """
1443
+ return exclusions.open()
1444
+
1445
+ @property
1446
+ def order_by_label_with_expression(self):
1447
+ """target backend supports ORDER BY a column label within an
1448
+ expression.
1449
+
1450
+ Basically this:
1451
+
1452
+ .. sourcecode:: sql
1453
+
1454
+ select data as foo from test order by foo || 'bar'
1455
+
1456
+ Lots of databases including PostgreSQL don't support this,
1457
+ so this is off by default.
1458
+
1459
+ """
1460
+ return exclusions.closed()
1461
+
1462
+ @property
1463
+ def order_by_collation(self):
1464
+ def check(config):
1465
+ try:
1466
+ self.get_order_by_collation(config)
1467
+ return False
1468
+ except NotImplementedError:
1469
+ return True
1470
+
1471
+ return exclusions.skip_if(check)
1472
+
1473
+ def get_order_by_collation(self, config):
1474
+ raise NotImplementedError()
1475
+
1476
+ @property
1477
+ def unicode_connections(self):
1478
+ """Target driver must support non-ASCII characters being passed at
1479
+ all.
1480
+ """
1481
+ return exclusions.open()
1482
+
1483
+ @property
1484
+ def graceful_disconnects(self):
1485
+ """Target driver must raise a DBAPI-level exception, such as
1486
+ InterfaceError, when the underlying connection has been closed
1487
+ and the execute() method is called.
1488
+ """
1489
+ return exclusions.open()
1490
+
1491
+ @property
1492
+ def independent_connections(self):
1493
+ """
1494
+ Target must support simultaneous, independent database connections.
1495
+ """
1496
+ return exclusions.open()
1497
+
1498
+ @property
1499
+ def independent_readonly_connections(self):
1500
+ """
1501
+ Target must support simultaneous, independent database connections
1502
+ that will be used in a readonly fashion.
1503
+
1504
+ """
1505
+ return exclusions.open()
1506
+
1507
+ @property
1508
+ def skip_mysql_on_windows(self):
1509
+ """Catchall for a large variety of MySQL on Windows failures"""
1510
+ return exclusions.open()
1511
+
1512
+ @property
1513
+ def ad_hoc_engines(self):
1514
+ """Test environment must allow ad-hoc engine/connection creation.
1515
+
1516
+ No longer used in any tests; is a no-op
1517
+
1518
+ """
1519
+ return exclusions.open()
1520
+
1521
+ @property
1522
+ def no_windows(self):
1523
+ return exclusions.skip_if(self._running_on_windows())
1524
+
1525
+ def _running_on_windows(self):
1526
+ return exclusions.LambdaPredicate(
1527
+ lambda: platform.system() == "Windows",
1528
+ description="running on Windows",
1529
+ )
1530
+
1531
+ @property
1532
+ def timing_intensive(self):
1533
+ from . import config
1534
+
1535
+ return config.add_to_marker.timing_intensive
1536
+
1537
+ @property
1538
+ def posix(self):
1539
+ return exclusions.skip_if(lambda: os.name != "posix")
1540
+
1541
+ @property
1542
+ def memory_intensive(self):
1543
+ from . import config
1544
+
1545
+ return config.add_to_marker.memory_intensive
1546
+
1547
+ @property
1548
+ def threading_with_mock(self):
1549
+ """Mark tests that use threading and mock at the same time - stability
1550
+ issues have been observed with coverage
1551
+
1552
+ """
1553
+ return exclusions.skip_if(
1554
+ lambda config: config.options.has_coverage,
1555
+ "Stability issues with coverage",
1556
+ )
1557
+
1558
+ @property
1559
+ def sqlalchemy2_stubs(self):
1560
+ def check(config):
1561
+ try:
1562
+ __import__("sqlalchemy-stubs.ext.mypy")
1563
+ except ImportError:
1564
+ return False
1565
+ else:
1566
+ return True
1567
+
1568
+ return exclusions.only_if(check)
1569
+
1570
+ @property
1571
+ def no_sqlalchemy2_stubs(self):
1572
+ def check(config):
1573
+ try:
1574
+ __import__("sqlalchemy-stubs.ext.mypy")
1575
+ except ImportError:
1576
+ return False
1577
+ else:
1578
+ return True
1579
+
1580
+ return exclusions.skip_if(check)
1581
+
1582
+ @property
1583
+ def up_to_date_typealias_type(self):
1584
+ # this checks a particular quirk found in typing_extensions <=4.12.0
1585
+ # using older python versions like 3.10 or 3.9, we use TypeAliasType
1586
+ # from typing_extensions which does not provide for sufficient
1587
+ # introspection prior to 4.13.0
1588
+ def check(config):
1589
+ import typing
1590
+ import typing_extensions
1591
+
1592
+ TypeAliasType = getattr(
1593
+ typing, "TypeAliasType", typing_extensions.TypeAliasType
1594
+ )
1595
+ TV = typing.TypeVar("TV")
1596
+ TA_generic = TypeAliasType( # type: ignore
1597
+ "TA_generic", typing.List[TV], type_params=(TV,)
1598
+ )
1599
+ return hasattr(TA_generic[int], "__value__")
1600
+
1601
+ return exclusions.only_if(check)
1602
+
1603
+ @property
1604
+ def python38(self):
1605
+ return exclusions.only_if(
1606
+ lambda: util.py38, "Python 3.8 or above required"
1607
+ )
1608
+
1609
+ @property
1610
+ def python39(self):
1611
+ return exclusions.only_if(
1612
+ lambda: util.py39, "Python 3.9 or above required"
1613
+ )
1614
+
1615
+ @property
1616
+ def python310(self):
1617
+ return exclusions.only_if(
1618
+ lambda: util.py310, "Python 3.10 or above required"
1619
+ )
1620
+
1621
+ @property
1622
+ def python311(self):
1623
+ return exclusions.only_if(
1624
+ lambda: util.py311, "Python 3.11 or above required"
1625
+ )
1626
+
1627
+ @property
1628
+ def python312(self):
1629
+ return exclusions.only_if(
1630
+ lambda: util.py312, "Python 3.12 or above required"
1631
+ )
1632
+
1633
+ @property
1634
+ def python314(self):
1635
+ return exclusions.only_if(
1636
+ lambda: util.py314, "Python 3.14 or above required"
1637
+ )
1638
+
1639
+ @property
1640
+ def fail_python314b1(self):
1641
+ return exclusions.fails_if(
1642
+ lambda: util.compat.py314b1, "Fails as of python 3.14.0b1"
1643
+ )
1644
+
1645
+ @property
1646
+ def not_python314(self):
1647
+ """This requirement is interim to assist with backporting of
1648
+ issue #12405.
1649
+
1650
+ SQLAlchemy 2.0 still includes the ``await_fallback()`` method that
1651
+ makes use of ``asyncio.get_event_loop_policy()``. This is removed
1652
+ in SQLAlchemy 2.1.
1653
+
1654
+ """
1655
+ return exclusions.skip_if(
1656
+ lambda: util.py314, "Python 3.14 or above not supported"
1657
+ )
1658
+
1659
+ @property
1660
+ def pep649(self):
1661
+ """pep649 deferred evaluation of annotations without future mode"""
1662
+ return self.python314
1663
+
1664
+ @property
1665
+ def cpython(self):
1666
+ return exclusions.only_if(
1667
+ lambda: util.cpython, "cPython interpreter needed"
1668
+ )
1669
+
1670
+ @property
1671
+ def gil_enabled(self):
1672
+ return exclusions.only_if(
1673
+ lambda: not util.freethreading, "GIL-enabled build needed"
1674
+ )
1675
+
1676
+ @property
1677
+ def is64bit(self):
1678
+ return exclusions.only_if(lambda: util.is64bit, "64bit required")
1679
+
1680
+ @property
1681
+ def patch_library(self):
1682
+ def check_lib():
1683
+ try:
1684
+ __import__("patch")
1685
+ except ImportError:
1686
+ return False
1687
+ else:
1688
+ return True
1689
+
1690
+ return exclusions.only_if(check_lib, "patch library needed")
1691
+
1692
+ @property
1693
+ def predictable_gc(self):
1694
+ """target platform must remove all cycles unconditionally when
1695
+ gc.collect() is called, as well as clean out unreferenced subclasses.
1696
+
1697
+ """
1698
+ return self.cpython + self.gil_enabled
1699
+
1700
+ @property
1701
+ def no_coverage(self):
1702
+ """Test should be skipped if coverage is enabled.
1703
+
1704
+ This is to block tests that exercise libraries that seem to be
1705
+ sensitive to coverage, such as PostgreSQL notice logging.
1706
+
1707
+ """
1708
+ return exclusions.skip_if(
1709
+ lambda config: config.options.has_coverage,
1710
+ "Issues observed when coverage is enabled",
1711
+ )
1712
+
1713
+ def _has_mysql_on_windows(self, config):
1714
+ return False
1715
+
1716
+ def _has_mysql_fully_case_sensitive(self, config):
1717
+ return False
1718
+
1719
+ @property
1720
+ def sqlite(self):
1721
+ return exclusions.skip_if(lambda: not self._has_sqlite())
1722
+
1723
+ @property
1724
+ def cextensions(self):
1725
+ return exclusions.skip_if(
1726
+ lambda: not util.has_compiled_ext(),
1727
+ "Cython extensions not installed",
1728
+ )
1729
+
1730
+ def _has_sqlite(self):
1731
+ from sqlalchemy import create_engine
1732
+
1733
+ try:
1734
+ create_engine("sqlite://")
1735
+ return True
1736
+ except ImportError:
1737
+ return False
1738
+
1739
+ @property
1740
+ def async_dialect(self):
1741
+ """dialect makes use of await_() to invoke operations on the DBAPI."""
1742
+
1743
+ return exclusions.closed()
1744
+
1745
+ @property
1746
+ def asyncio(self):
1747
+ return self.greenlet
1748
+
1749
+ @property
1750
+ def no_greenlet(self):
1751
+ def go(config):
1752
+ try:
1753
+ import greenlet # noqa: F401
1754
+ except ImportError:
1755
+ return True
1756
+ else:
1757
+ return False
1758
+
1759
+ return exclusions.only_if(go)
1760
+
1761
+ @property
1762
+ def greenlet(self):
1763
+ def go(config):
1764
+ if not _test_asyncio.ENABLE_ASYNCIO:
1765
+ return False
1766
+
1767
+ try:
1768
+ import greenlet # noqa: F401
1769
+ except ImportError:
1770
+ return False
1771
+ else:
1772
+ return True
1773
+
1774
+ return exclusions.only_if(go)
1775
+
1776
+ @property
1777
+ def computed_columns(self):
1778
+ "Supports computed columns"
1779
+ return exclusions.closed()
1780
+
1781
+ @property
1782
+ def computed_columns_stored(self):
1783
+ "Supports computed columns with `persisted=True`"
1784
+ return exclusions.closed()
1785
+
1786
+ @property
1787
+ def computed_columns_virtual(self):
1788
+ "Supports computed columns with `persisted=False`"
1789
+ return exclusions.closed()
1790
+
1791
+ @property
1792
+ def computed_columns_default_persisted(self):
1793
+ """If the default persistence is virtual or stored when `persisted`
1794
+ is omitted"""
1795
+ return exclusions.closed()
1796
+
1797
+ @property
1798
+ def computed_columns_reflect_persisted(self):
1799
+ """If persistence information is returned by the reflection of
1800
+ computed columns"""
1801
+ return exclusions.closed()
1802
+
1803
+ @property
1804
+ def supports_distinct_on(self):
1805
+ """If a backend supports the DISTINCT ON in a select"""
1806
+ return exclusions.closed()
1807
+
1808
+ @property
1809
+ def supports_is_distinct_from(self):
1810
+ """Supports some form of "x IS [NOT] DISTINCT FROM y" construct.
1811
+ Different dialects will implement their own flavour, e.g.,
1812
+ sqlite will emit "x IS NOT y" instead of "x IS DISTINCT FROM y".
1813
+
1814
+ .. seealso::
1815
+
1816
+ :meth:`.ColumnOperators.is_distinct_from`
1817
+
1818
+ """
1819
+ return exclusions.skip_if(
1820
+ lambda config: not config.db.dialect.supports_is_distinct_from,
1821
+ "driver doesn't support an IS DISTINCT FROM construct",
1822
+ )
1823
+
1824
+ @property
1825
+ def identity_columns(self):
1826
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1827
+ AS IDENTITY"""
1828
+ return exclusions.closed()
1829
+
1830
+ @property
1831
+ def identity_columns_standard(self):
1832
+ """If a backend supports GENERATED { ALWAYS | BY DEFAULT }
1833
+ AS IDENTITY with a standard syntax.
1834
+ This is mainly to exclude MSSql.
1835
+ """
1836
+ return exclusions.closed()
1837
+
1838
+ @property
1839
+ def regexp_match(self):
1840
+ """backend supports the regexp_match operator."""
1841
+ return exclusions.closed()
1842
+
1843
+ @property
1844
+ def regexp_replace(self):
1845
+ """backend supports the regexp_replace operator."""
1846
+ return exclusions.closed()
1847
+
1848
+ @property
1849
+ def fetch_first(self):
1850
+ """backend supports the fetch first clause."""
1851
+ return exclusions.closed()
1852
+
1853
+ @property
1854
+ def fetch_percent(self):
1855
+ """backend supports the fetch first clause with percent."""
1856
+ return exclusions.closed()
1857
+
1858
+ @property
1859
+ def fetch_ties(self):
1860
+ """backend supports the fetch first clause with ties."""
1861
+ return exclusions.closed()
1862
+
1863
+ @property
1864
+ def fetch_no_order_by(self):
1865
+ """backend supports the fetch first without order by"""
1866
+ return exclusions.closed()
1867
+
1868
+ @property
1869
+ def fetch_offset_with_options(self):
1870
+ """backend supports the offset when using fetch first with percent
1871
+ or ties. basically this is "not mssql"
1872
+ """
1873
+ return exclusions.closed()
1874
+
1875
+ @property
1876
+ def fetch_expression(self):
1877
+ """backend supports fetch / offset with expression in them, like
1878
+
1879
+ SELECT * FROM some_table
1880
+ OFFSET 1 + 1 ROWS FETCH FIRST 1 + 1 ROWS ONLY
1881
+ """
1882
+ return exclusions.closed()
1883
+
1884
+ @property
1885
+ def autoincrement_without_sequence(self):
1886
+ """If autoincrement=True on a column does not require an explicit
1887
+ sequence. This should be false only for oracle.
1888
+ """
1889
+ return exclusions.open()
1890
+
1891
+ @property
1892
+ def generic_classes(self):
1893
+ "If X[Y] can be implemented with ``__class_getitem__``. py3.7+"
1894
+ return exclusions.open()
1895
+
1896
+ @property
1897
+ def json_deserializer_binary(self):
1898
+ "indicates if the json_deserializer function is called with bytes"
1899
+ return exclusions.closed()
1900
+
1901
+ @property
1902
+ def reflect_table_options(self):
1903
+ """Target database must support reflecting table_options."""
1904
+ return exclusions.closed()
1905
+
1906
+ @property
1907
+ def materialized_views(self):
1908
+ """Target database must support MATERIALIZED VIEWs."""
1909
+ return exclusions.closed()
1910
+
1911
+ @property
1912
+ def materialized_views_reflect_pk(self):
1913
+ """Target database reflect MATERIALIZED VIEWs pks."""
1914
+ return exclusions.closed()
1915
+
1916
+ @property
1917
+ def supports_bitwise_or(self):
1918
+ """Target database supports bitwise or"""
1919
+ return exclusions.closed()
1920
+
1921
+ @property
1922
+ def supports_bitwise_and(self):
1923
+ """Target database supports bitwise and"""
1924
+ return exclusions.closed()
1925
+
1926
+ @property
1927
+ def supports_bitwise_not(self):
1928
+ """Target database supports bitwise not"""
1929
+ return exclusions.closed()
1930
+
1931
+ @property
1932
+ def supports_bitwise_xor(self):
1933
+ """Target database supports bitwise xor"""
1934
+ return exclusions.closed()
1935
+
1936
+ @property
1937
+ def supports_bitwise_shift(self):
1938
+ """Target database supports bitwise left or right shift"""
1939
+ return exclusions.closed()
1940
+
1941
+ @property
1942
+ def like_escapes(self):
1943
+ """Target backend supports custom ESCAPE characters
1944
+ with LIKE comparisons"""
1945
+ return exclusions.open()