sqlspec 0.25.0__tar.gz → 0.26.0__tar.gz

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.

Potentially problematic release.


This version of sqlspec might be problematic. Click here for more details.

Files changed (375) hide show
  1. {sqlspec-0.25.0 → sqlspec-0.26.0}/.gitignore +3 -0
  2. {sqlspec-0.25.0 → sqlspec-0.26.0}/.pre-commit-config.yaml +1 -1
  3. {sqlspec-0.25.0 → sqlspec-0.26.0}/PKG-INFO +1 -1
  4. {sqlspec-0.25.0 → sqlspec-0.26.0}/pyproject.toml +9 -1
  5. sqlspec-0.26.0/sqlspec/_serialization.py +279 -0
  6. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/_sql.py +12 -50
  7. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/_typing.py +9 -0
  8. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/adbc/config.py +8 -1
  9. sqlspec-0.26.0/sqlspec/adapters/adbc/data_dictionary.py +290 -0
  10. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/adbc/driver.py +127 -18
  11. sqlspec-0.26.0/sqlspec/adapters/adbc/type_converter.py +159 -0
  12. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/aiosqlite/config.py +3 -0
  13. sqlspec-0.26.0/sqlspec/adapters/aiosqlite/data_dictionary.py +117 -0
  14. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/aiosqlite/driver.py +17 -3
  15. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncmy/_types.py +1 -1
  16. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncmy/config.py +11 -8
  17. sqlspec-0.26.0/sqlspec/adapters/asyncmy/data_dictionary.py +122 -0
  18. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncmy/driver.py +31 -7
  19. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncpg/config.py +3 -0
  20. sqlspec-0.26.0/sqlspec/adapters/asyncpg/data_dictionary.py +134 -0
  21. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncpg/driver.py +19 -4
  22. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/bigquery/config.py +3 -0
  23. sqlspec-0.26.0/sqlspec/adapters/bigquery/data_dictionary.py +109 -0
  24. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/bigquery/driver.py +21 -3
  25. sqlspec-0.26.0/sqlspec/adapters/bigquery/type_converter.py +93 -0
  26. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/duckdb/_types.py +1 -1
  27. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/duckdb/config.py +2 -0
  28. sqlspec-0.26.0/sqlspec/adapters/duckdb/data_dictionary.py +124 -0
  29. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/duckdb/driver.py +32 -5
  30. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/duckdb/pool.py +1 -1
  31. sqlspec-0.26.0/sqlspec/adapters/duckdb/type_converter.py +103 -0
  32. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/oracledb/config.py +6 -0
  33. sqlspec-0.26.0/sqlspec/adapters/oracledb/data_dictionary.py +442 -0
  34. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/oracledb/driver.py +63 -9
  35. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/oracledb/migrations.py +51 -67
  36. sqlspec-0.26.0/sqlspec/adapters/oracledb/type_converter.py +132 -0
  37. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psqlpy/config.py +3 -0
  38. sqlspec-0.26.0/sqlspec/adapters/psqlpy/data_dictionary.py +133 -0
  39. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psqlpy/driver.py +23 -179
  40. sqlspec-0.26.0/sqlspec/adapters/psqlpy/type_converter.py +73 -0
  41. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psycopg/config.py +6 -0
  42. sqlspec-0.26.0/sqlspec/adapters/psycopg/data_dictionary.py +257 -0
  43. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psycopg/driver.py +40 -5
  44. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/sqlite/config.py +3 -0
  45. sqlspec-0.26.0/sqlspec/adapters/sqlite/data_dictionary.py +117 -0
  46. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/sqlite/driver.py +18 -3
  47. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/sqlite/pool.py +13 -4
  48. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_base.py +82 -42
  49. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_column.py +57 -24
  50. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_ddl.py +84 -34
  51. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_insert.py +30 -52
  52. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_parsing_utils.py +104 -8
  53. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_select.py +147 -2
  54. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_cte_and_set_ops.py +1 -2
  55. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_join_operations.py +14 -30
  56. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_merge_operations.py +167 -61
  57. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_order_limit_operations.py +3 -10
  58. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_select_operations.py +3 -9
  59. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_update_operations.py +3 -22
  60. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_where_clause.py +4 -10
  61. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/cli.py +246 -140
  62. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/config.py +33 -19
  63. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/cache.py +2 -2
  64. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/compiler.py +56 -1
  65. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/parameters.py +7 -3
  66. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/statement.py +5 -0
  67. sqlspec-0.26.0/sqlspec/core/type_conversion.py +234 -0
  68. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/__init__.py +6 -3
  69. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/_async.py +106 -3
  70. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/_common.py +156 -4
  71. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/_sync.py +106 -3
  72. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/exceptions.py +5 -0
  73. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/__init__.py +4 -3
  74. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/base.py +153 -14
  75. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/commands.py +34 -96
  76. sqlspec-0.26.0/sqlspec/migrations/context.py +145 -0
  77. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/loaders.py +25 -8
  78. sqlspec-0.26.0/sqlspec/migrations/runner.py +568 -0
  79. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/typing.py +2 -0
  80. sqlspec-0.26.0/sqlspec/utils/config_resolver.py +153 -0
  81. sqlspec-0.26.0/sqlspec/utils/serializers.py +58 -0
  82. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/conftest.py +21 -2
  83. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_backends.py +14 -4
  84. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_driver.py +114 -12
  85. sqlspec-0.26.0/tests/integration/test_adapters/test_adbc/test_data_dictionary.py +140 -0
  86. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_migrations.py +6 -6
  87. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/test_driver.py +91 -0
  88. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/test_driver.py +80 -0
  89. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/conftest.py +22 -0
  90. sqlspec-0.26.0/tests/integration/test_adapters/test_asyncpg/test_data_dictionary.py +105 -0
  91. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/test_driver.py +203 -0
  92. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/test_driver.py +52 -0
  93. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_driver.py +107 -0
  94. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_migrations.py +6 -6
  95. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_driver_async.py +125 -0
  96. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_driver_sync.py +134 -14
  97. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_migrations.py +7 -7
  98. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_parameter_styles.py +22 -20
  99. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/test_driver.py +107 -0
  100. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_driver.py +107 -0
  101. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_migrations.py +6 -6
  102. sqlspec-0.26.0/tests/integration/test_adapters/test_sqlite/test_data_dictionary.py +92 -0
  103. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/test_driver.py +67 -0
  104. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/test_migrations.py +16 -11
  105. sqlspec-0.26.0/tests/integration/test_async_migrations.py +278 -0
  106. sqlspec-0.26.0/tests/integration/test_dishka/__init__.py +1 -0
  107. sqlspec-0.26.0/tests/integration/test_dishka/conftest.py +113 -0
  108. sqlspec-0.26.0/tests/integration/test_dishka/test_dishka_integration.py +536 -0
  109. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/conftest.py +64 -1
  110. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_adapters/conftest.py +64 -1
  111. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_builder/test_insert_builder.py +1 -2
  112. sqlspec-0.26.0/tests/unit/test_builder/test_select_locking.py +235 -0
  113. sqlspec-0.26.0/tests/unit/test_cli/__init__.py +1 -0
  114. sqlspec-0.26.0/tests/unit/test_cli/test_config_loading.py +129 -0
  115. sqlspec-0.26.0/tests/unit/test_cli/test_migration_commands.py +742 -0
  116. sqlspec-0.26.0/tests/unit/test_config_resolver.py +197 -0
  117. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_compiler.py +1 -0
  118. sqlspec-0.26.0/tests/unit/test_driver/test_data_dictionary.py +328 -0
  119. sqlspec-0.26.0/tests/unit/test_migration_context.py +172 -0
  120. sqlspec-0.26.0/tests/unit/test_migrations/test_extension_discovery.py +108 -0
  121. sqlspec-0.26.0/tests/unit/test_migrations/test_migration_commands.py +291 -0
  122. sqlspec-0.26.0/tests/unit/test_migrations/test_migration_context.py +36 -0
  123. sqlspec-0.26.0/tests/unit/test_serialization.py +254 -0
  124. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_sql_factory.py +53 -3
  125. sqlspec-0.26.0/tests/unit/test_type_conversion.py +305 -0
  126. {sqlspec-0.25.0 → sqlspec-0.26.0}/uv.lock +641 -527
  127. sqlspec-0.25.0/sqlspec/_serialization.py +0 -77
  128. sqlspec-0.25.0/sqlspec/migrations/runner.py +0 -298
  129. sqlspec-0.25.0/sqlspec/utils/serializers.py +0 -10
  130. sqlspec-0.25.0/tests/unit/test_migrations/test_migration_commands.py +0 -317
  131. {sqlspec-0.25.0 → sqlspec-0.26.0}/CONTRIBUTING.rst +0 -0
  132. {sqlspec-0.25.0 → sqlspec-0.26.0}/LICENSE +0 -0
  133. {sqlspec-0.25.0 → sqlspec-0.26.0}/Makefile +0 -0
  134. {sqlspec-0.25.0 → sqlspec-0.26.0}/NOTICE +0 -0
  135. {sqlspec-0.25.0 → sqlspec-0.26.0}/README.md +0 -0
  136. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/__init__.py +0 -0
  137. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/__main__.py +0 -0
  138. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/__metadata__.py +0 -0
  139. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/__init__.py +0 -0
  140. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/adbc/__init__.py +0 -0
  141. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/adbc/_types.py +0 -0
  142. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/aiosqlite/__init__.py +0 -0
  143. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/aiosqlite/_types.py +0 -0
  144. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/aiosqlite/pool.py +0 -0
  145. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncmy/__init__.py +0 -0
  146. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncpg/__init__.py +0 -0
  147. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/asyncpg/_types.py +0 -0
  148. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/bigquery/__init__.py +0 -0
  149. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/bigquery/_types.py +0 -0
  150. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/duckdb/__init__.py +0 -0
  151. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/oracledb/__init__.py +0 -0
  152. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/oracledb/_types.py +0 -0
  153. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psqlpy/__init__.py +0 -0
  154. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psqlpy/_types.py +0 -0
  155. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psycopg/__init__.py +0 -0
  156. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/psycopg/_types.py +0 -0
  157. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/sqlite/__init__.py +0 -0
  158. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/adapters/sqlite/_types.py +0 -0
  159. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/base.py +0 -0
  160. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/__init__.py +0 -0
  161. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_delete.py +0 -0
  162. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_expression_wrappers.py +0 -0
  163. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_merge.py +0 -0
  164. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/_update.py +0 -0
  165. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/__init__.py +0 -0
  166. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_delete_operations.py +0 -0
  167. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_insert_operations.py +0 -0
  168. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/builder/mixins/_pivot_operations.py +0 -0
  169. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/__init__.py +0 -0
  170. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/filters.py +0 -0
  171. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/hashing.py +0 -0
  172. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/result.py +0 -0
  173. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/core/splitter.py +0 -0
  174. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/mixins/__init__.py +0 -0
  175. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/mixins/_result_tools.py +0 -0
  176. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/driver/mixins/_sql_translator.py +0 -0
  177. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/__init__.py +0 -0
  178. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/aiosql/__init__.py +0 -0
  179. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/aiosql/adapter.py +0 -0
  180. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/__init__.py +0 -0
  181. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/_utils.py +0 -0
  182. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/cli.py +0 -0
  183. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/config.py +0 -0
  184. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/handlers.py +0 -0
  185. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/plugin.py +0 -0
  186. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/extensions/litestar/providers.py +0 -0
  187. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/loader.py +0 -0
  188. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/tracker.py +0 -0
  189. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/migrations/utils.py +0 -0
  190. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/protocols.py +0 -0
  191. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/py.typed +0 -0
  192. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/__init__.py +0 -0
  193. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/backends/__init__.py +0 -0
  194. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/backends/base.py +0 -0
  195. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/backends/fsspec.py +0 -0
  196. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/backends/local.py +0 -0
  197. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/backends/obstore.py +0 -0
  198. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/storage/registry.py +0 -0
  199. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/__init__.py +0 -0
  200. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/correlation.py +0 -0
  201. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/data_transformation.py +0 -0
  202. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/deprecation.py +0 -0
  203. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/fixtures.py +0 -0
  204. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/logging.py +0 -0
  205. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/module_loader.py +0 -0
  206. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/singleton.py +0 -0
  207. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/sync_tools.py +0 -0
  208. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/text.py +0 -0
  209. {sqlspec-0.25.0 → sqlspec-0.26.0}/sqlspec/utils/type_guards.py +0 -0
  210. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/__init__.py +0 -0
  211. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/conftest.py +0 -0
  212. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/__init__.py +0 -0
  213. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/asset_maintenance.sql +0 -0
  214. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/ddls-mysql-collection.sql +0 -0
  215. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/ddls-postgres-collection.sql +0 -0
  216. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/example_usage.py +0 -0
  217. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/init.sql +0 -0
  218. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-config.sql +0 -0
  219. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-data_types.sql +0 -0
  220. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-database_details.sql +0 -0
  221. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-engines.sql +0 -0
  222. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-hostname.sql +0 -0
  223. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-plugins.sql +0 -0
  224. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-process_list.sql +0 -0
  225. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-resource-groups.sql +0 -0
  226. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-schema_objects.sql +0 -0
  227. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-table_details.sql +0 -0
  228. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/collection-users.sql +0 -0
  229. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/mysql/init.sql +0 -0
  230. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/oracle.ddl.sql +0 -0
  231. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-applications.sql +0 -0
  232. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-aws_extension_dependency.sql +0 -0
  233. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-aws_oracle_exists.sql +0 -0
  234. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-bg_writer_stats.sql +0 -0
  235. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-calculated_metrics.sql +0 -0
  236. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-data_types.sql +0 -0
  237. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-database_details.sql +0 -0
  238. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-extensions.sql +0 -0
  239. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-index_details.sql +0 -0
  240. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-pglogical-details.sql +0 -0
  241. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-privileges.sql +0 -0
  242. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-replication_slots.sql +0 -0
  243. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-replication_stats.sql +0 -0
  244. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-schema_details.sql +0 -0
  245. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-schema_objects.sql +0 -0
  246. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-settings.sql +0 -0
  247. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-source_details.sql +0 -0
  248. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/collection-table_details.sql +0 -0
  249. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/extended-collection-all-databases.sql +0 -0
  250. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/postgres/init.sql +0 -0
  251. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/readiness-check.sql +0 -0
  252. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/fixtures/sql_utils.py +0 -0
  253. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/__init__.py +0 -0
  254. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/conftest.py +0 -0
  255. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/__init__.py +0 -0
  256. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/__init__.py +0 -0
  257. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_arrow_features.py +0 -0
  258. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_connection.py +0 -0
  259. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_edge_cases.py +0 -0
  260. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_adbc_results.py +0 -0
  261. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_adbc/test_parameter_styles.py +0 -0
  262. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/__init__.py +0 -0
  263. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/conftest.py +0 -0
  264. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/test_connection.py +0 -0
  265. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/test_migrations.py +0 -0
  266. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/test_parameter_styles.py +0 -0
  267. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_aiosqlite/test_pooling.py +0 -0
  268. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/__init__.py +0 -0
  269. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/conftest.py +0 -0
  270. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/test_asyncmy_features.py +0 -0
  271. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/test_config.py +0 -0
  272. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/test_migrations.py +0 -0
  273. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncmy/test_parameter_styles.py +0 -0
  274. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/__init__.py +0 -0
  275. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/test_connection.py +0 -0
  276. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/test_execute_many.py +0 -0
  277. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/test_migrations.py +0 -0
  278. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_asyncpg/test_parameter_styles.py +0 -0
  279. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/__init__.py +0 -0
  280. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/conftest.py +0 -0
  281. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/test_bigquery_features.py +0 -0
  282. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/test_config.py +0 -0
  283. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_bigquery/test_connection.py +0 -0
  284. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/__init__.py +0 -0
  285. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_connection.py +0 -0
  286. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_execute_many.py +0 -0
  287. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_mixed_parameter_styles.py +0 -0
  288. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_parameter_styles.py +0 -0
  289. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/test_pooling.py +0 -0
  290. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_duckdb/utils.py +0 -0
  291. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/__init__.py +0 -0
  292. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/conftest.py +0 -0
  293. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_connection.py +0 -0
  294. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_execute_many.py +0 -0
  295. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_oracledb/test_oracle_features.py +0 -0
  296. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/__init__.py +0 -0
  297. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/conftest.py +0 -0
  298. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/test_connection.py +0 -0
  299. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/test_migrations.py +0 -0
  300. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/test_parameter_styles.py +0 -0
  301. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psqlpy/test_psqlpy_features.py +0 -0
  302. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/__init__.py +0 -0
  303. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/conftest.py +0 -0
  304. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_async_copy.py +0 -0
  305. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_connection.py +0 -0
  306. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_execute_many.py +0 -0
  307. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_psycopg/test_parameter_styles.py +0 -0
  308. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/__init__.py +0 -0
  309. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/conftest.py +0 -0
  310. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/test_parameter_styles.py +0 -0
  311. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/test_pooling.py +0 -0
  312. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_adapters/test_sqlite/test_query_mixin.py +0 -0
  313. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_loader/__init__.py +0 -0
  314. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_loader/test_file_system_loading.py +0 -0
  315. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_migrations/__init__.py +0 -0
  316. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_storage/__init__.py +0 -0
  317. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/integration/test_storage/test_storage_integration.py +0 -0
  318. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_adapters/__init__.py +0 -0
  319. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_adapters/test_adapter_implementations.py +0 -0
  320. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_adapters/test_async_adapters.py +0 -0
  321. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_adapters/test_sync_adapters.py +0 -0
  322. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_base/__init__.py +0 -0
  323. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_base/test_sql_integration.py +0 -0
  324. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_base/test_sqlspec_class.py +0 -0
  325. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_builder/__init__.py +0 -0
  326. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_builder/test_lateral_joins.py +0 -0
  327. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_builder/test_parameter_naming.py +0 -0
  328. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_builder_parameter_naming.py +0 -0
  329. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_cache.py +0 -0
  330. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_filters.py +0 -0
  331. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_hashing.py +0 -0
  332. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_parameters.py +0 -0
  333. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_result.py +0 -0
  334. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_core/test_statement.py +0 -0
  335. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_cte_parameter_collisions.py +0 -0
  336. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_driver/__init__.py +0 -0
  337. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_driver/test_result_tools.py +0 -0
  338. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_extensions/__init__.py +0 -0
  339. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_extensions/test_litestar/__init__.py +0 -0
  340. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_extensions/test_litestar/test_config.py +0 -0
  341. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_loader/__init__.py +0 -0
  342. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_loader/test_cache_integration.py +0 -0
  343. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_loader/test_fixtures_directory_loading.py +0 -0
  344. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_loader/test_loading_patterns.py +0 -0
  345. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_loader/test_sql_file_loader.py +0 -0
  346. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_migrations/__init__.py +0 -0
  347. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_migrations/test_migration.py +0 -0
  348. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_migrations/test_migration_execution.py +0 -0
  349. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_migrations/test_migration_runner.py +0 -0
  350. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_parsing_utils.py +0 -0
  351. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_storage/__init__.py +0 -0
  352. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_storage/test_fsspec_backend.py +0 -0
  353. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_storage/test_local_store.py +0 -0
  354. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_storage/test_obstore_backend.py +0 -0
  355. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_storage/test_storage_registry.py +0 -0
  356. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/__init__.py +0 -0
  357. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_correlation.py +0 -0
  358. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_data_transformation.py +0 -0
  359. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_deprecation.py +0 -0
  360. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_fixtures.py +0 -0
  361. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_logging.py +0 -0
  362. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_module_loader.py +0 -0
  363. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_serializers.py +0 -0
  364. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_singleton.py +0 -0
  365. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_sync_tools.py +0 -0
  366. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_text.py +0 -0
  367. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_utils/test_type_guards.py +0 -0
  368. {sqlspec-0.25.0 → sqlspec-0.26.0}/tests/unit/test_where_or_operations.py +0 -0
  369. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/__init__.py +0 -0
  370. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/build_docs.py +0 -0
  371. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/local-infra.sh +0 -0
  372. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/pypi_readme.py +0 -0
  373. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/sphinx_ext/__init__.py +0 -0
  374. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/sphinx_ext/changelog.py +0 -0
  375. {sqlspec-0.25.0 → sqlspec-0.26.0}/tools/sphinx_ext/missing_references.py +0 -0
@@ -61,3 +61,6 @@ benchmarks/
61
61
  *.duckdb
62
62
  .crush
63
63
  CRUSH.md
64
+ *.md
65
+ !README.md
66
+ !CONTRIBUTING.md
@@ -17,7 +17,7 @@ repos:
17
17
  - id: mixed-line-ending
18
18
  - id: trailing-whitespace
19
19
  - repo: https://github.com/charliermarsh/ruff-pre-commit
20
- rev: "v0.13.0"
20
+ rev: "v0.13.2"
21
21
  hooks:
22
22
  - id: ruff
23
23
  args: ["--fix"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlspec
3
- Version: 0.25.0
3
+ Version: 0.26.0
4
4
  Summary: SQL Experiments in Python
5
5
  Project-URL: Discord, https://discord.gg/litestar
6
6
  Project-URL: Issue, https://github.com/litestar-org/sqlspec/issues/
@@ -13,7 +13,7 @@ maintainers = [{ name = "Litestar Developers", email = "hello@litestar.dev" }]
13
13
  name = "sqlspec"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.9, <4.0"
16
- version = "0.25.0"
16
+ version = "0.26.0"
17
17
 
18
18
  [project.urls]
19
19
  Discord = "https://discord.gg/litestar"
@@ -91,6 +91,7 @@ extras = [
91
91
  "adbc_driver_postgresql",
92
92
  "adbc_driver_flightsql",
93
93
  "adbc_driver_bigquery",
94
+ "dishka ; python_version >= \"3.10\"",
94
95
  ]
95
96
  lint = [
96
97
  "mypy>=1.13.0",
@@ -161,6 +162,13 @@ include = [
161
162
  "sqlspec/core/**/*.py", # Core module
162
163
  "sqlspec/loader.py", # Loader module
163
164
 
165
+ # === ADAPTER TYPE CONVERTERS ===
166
+ "sqlspec/adapters/adbc/type_converter.py", # ADBC type converter
167
+ "sqlspec/adapters/bigquery/type_converter.py", # BigQuery type converter
168
+ "sqlspec/adapters/duckdb/type_converter.py", # DuckDB type converter
169
+ "sqlspec/adapters/oracledb/type_converter.py", # Oracle type converter
170
+ "sqlspec/adapters/psqlpy/type_converter.py", # Psqlpy type converter
171
+
164
172
  # === UTILITY MODULES ===
165
173
  "sqlspec/utils/text.py", # Text utilities
166
174
  "sqlspec/utils/sync_tools.py", # Synchronous utility functions
@@ -0,0 +1,279 @@
1
+ """Enhanced serialization module with byte-aware encoding and class-based architecture.
2
+
3
+ Provides a Protocol-based serialization system that users can extend.
4
+ Supports msgspec, orjson, and standard library JSON with automatic fallback.
5
+ """
6
+
7
+ import contextlib
8
+ import datetime
9
+ import enum
10
+ import json
11
+ from abc import ABC, abstractmethod
12
+ from typing import Any, Final, Literal, Optional, Protocol, Union, overload
13
+
14
+ from sqlspec.typing import MSGSPEC_INSTALLED, ORJSON_INSTALLED, PYDANTIC_INSTALLED, BaseModel
15
+
16
+
17
+ def _type_to_string(value: Any) -> str: # pragma: no cover
18
+ """Convert special types to strings for JSON serialization.
19
+
20
+ Args:
21
+ value: Value to convert.
22
+
23
+ Returns:
24
+ String representation of the value.
25
+ """
26
+ if isinstance(value, datetime.datetime):
27
+ return convert_datetime_to_gmt_iso(value)
28
+ if isinstance(value, datetime.date):
29
+ return convert_date_to_iso(value)
30
+ if isinstance(value, enum.Enum):
31
+ return str(value.value)
32
+ if PYDANTIC_INSTALLED and isinstance(value, BaseModel):
33
+ return value.model_dump_json()
34
+ try:
35
+ return str(value)
36
+ except Exception as exc:
37
+ raise TypeError from exc
38
+
39
+
40
+ class JSONSerializer(Protocol):
41
+ """Protocol for JSON serialization implementations.
42
+
43
+ Users can implement this protocol to create custom serializers.
44
+ """
45
+
46
+ def encode(self, data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
47
+ """Encode data to JSON.
48
+
49
+ Args:
50
+ data: Data to encode.
51
+ as_bytes: Whether to return bytes instead of string.
52
+
53
+ Returns:
54
+ JSON string or bytes depending on as_bytes parameter.
55
+ """
56
+ ...
57
+
58
+ def decode(self, data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
59
+ """Decode from JSON.
60
+
61
+ Args:
62
+ data: JSON string or bytes to decode.
63
+ decode_bytes: Whether to decode bytes input.
64
+
65
+ Returns:
66
+ Decoded Python object.
67
+ """
68
+ ...
69
+
70
+
71
+ class BaseJSONSerializer(ABC):
72
+ """Base class for JSON serializers with common functionality."""
73
+
74
+ __slots__ = ()
75
+
76
+ @abstractmethod
77
+ def encode(self, data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
78
+ """Encode data to JSON."""
79
+ ...
80
+
81
+ @abstractmethod
82
+ def decode(self, data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
83
+ """Decode from JSON."""
84
+ ...
85
+
86
+
87
+ class MsgspecSerializer(BaseJSONSerializer):
88
+ """Msgspec-based JSON serializer for optimal performance."""
89
+
90
+ __slots__ = ("_decoder", "_encoder")
91
+
92
+ def __init__(self) -> None:
93
+ """Initialize msgspec encoder and decoder."""
94
+ from msgspec.json import Decoder, Encoder
95
+
96
+ self._encoder: Final[Encoder] = Encoder(enc_hook=_type_to_string)
97
+ self._decoder: Final[Decoder] = Decoder()
98
+
99
+ def encode(self, data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
100
+ """Encode data using msgspec."""
101
+ try:
102
+ if as_bytes:
103
+ return self._encoder.encode(data)
104
+ return self._encoder.encode(data).decode("utf-8")
105
+ except (TypeError, ValueError):
106
+ if ORJSON_INSTALLED:
107
+ return OrjsonSerializer().encode(data, as_bytes=as_bytes)
108
+ return StandardLibSerializer().encode(data, as_bytes=as_bytes)
109
+
110
+ def decode(self, data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
111
+ """Decode data using msgspec."""
112
+ if isinstance(data, bytes):
113
+ if decode_bytes:
114
+ try:
115
+ return self._decoder.decode(data)
116
+ except (TypeError, ValueError):
117
+ if ORJSON_INSTALLED:
118
+ return OrjsonSerializer().decode(data, decode_bytes=decode_bytes)
119
+ return StandardLibSerializer().decode(data, decode_bytes=decode_bytes)
120
+ return data
121
+
122
+ try:
123
+ return self._decoder.decode(data.encode("utf-8"))
124
+ except (TypeError, ValueError):
125
+ if ORJSON_INSTALLED:
126
+ return OrjsonSerializer().decode(data, decode_bytes=decode_bytes)
127
+ return StandardLibSerializer().decode(data, decode_bytes=decode_bytes)
128
+
129
+
130
+ class OrjsonSerializer(BaseJSONSerializer):
131
+ """Orjson-based JSON serializer with native datetime/UUID support."""
132
+
133
+ __slots__ = ()
134
+
135
+ def encode(self, data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
136
+ """Encode data using orjson."""
137
+ from orjson import (
138
+ OPT_NAIVE_UTC, # pyright: ignore[reportUnknownVariableType]
139
+ OPT_SERIALIZE_NUMPY, # pyright: ignore[reportUnknownVariableType]
140
+ OPT_SERIALIZE_UUID, # pyright: ignore[reportUnknownVariableType]
141
+ )
142
+ from orjson import dumps as _orjson_dumps # pyright: ignore[reportMissingImports]
143
+
144
+ result = _orjson_dumps(
145
+ data, default=_type_to_string, option=OPT_SERIALIZE_NUMPY | OPT_NAIVE_UTC | OPT_SERIALIZE_UUID
146
+ )
147
+ return result if as_bytes else result.decode("utf-8")
148
+
149
+ def decode(self, data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
150
+ """Decode data using orjson."""
151
+ from orjson import loads as _orjson_loads # pyright: ignore[reportMissingImports]
152
+
153
+ if isinstance(data, bytes):
154
+ if decode_bytes:
155
+ return _orjson_loads(data)
156
+ return data
157
+ return _orjson_loads(data)
158
+
159
+
160
+ class StandardLibSerializer(BaseJSONSerializer):
161
+ """Standard library JSON serializer as fallback."""
162
+
163
+ __slots__ = ()
164
+
165
+ def encode(self, data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
166
+ """Encode data using standard library json."""
167
+ json_str = json.dumps(data, default=_type_to_string)
168
+ return json_str.encode("utf-8") if as_bytes else json_str
169
+
170
+ def decode(self, data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
171
+ """Decode data using standard library json."""
172
+ if isinstance(data, bytes):
173
+ if decode_bytes:
174
+ return json.loads(data.decode("utf-8"))
175
+ return data
176
+ return json.loads(data)
177
+
178
+
179
+ _default_serializer: Optional[JSONSerializer] = None
180
+
181
+
182
+ def get_default_serializer() -> JSONSerializer:
183
+ """Get the default serializer based on available libraries.
184
+
185
+ Priority: msgspec > orjson > stdlib
186
+
187
+ Returns:
188
+ The best available JSON serializer.
189
+ """
190
+ global _default_serializer
191
+
192
+ if _default_serializer is None:
193
+ if MSGSPEC_INSTALLED:
194
+ with contextlib.suppress(ImportError):
195
+ _default_serializer = MsgspecSerializer()
196
+
197
+ if _default_serializer is None and ORJSON_INSTALLED:
198
+ with contextlib.suppress(ImportError):
199
+ _default_serializer = OrjsonSerializer()
200
+
201
+ if _default_serializer is None:
202
+ _default_serializer = StandardLibSerializer()
203
+
204
+ assert _default_serializer is not None
205
+ return _default_serializer
206
+
207
+
208
+ @overload
209
+ def encode_json(data: Any, *, as_bytes: Literal[False] = ...) -> str: ... # pragma: no cover
210
+
211
+
212
+ @overload
213
+ def encode_json(data: Any, *, as_bytes: Literal[True]) -> bytes: ... # pragma: no cover
214
+
215
+
216
+ def encode_json(data: Any, *, as_bytes: bool = False) -> Union[str, bytes]:
217
+ """Encode to JSON, optionally returning bytes for optimal performance.
218
+
219
+ Args:
220
+ data: The data to encode.
221
+ as_bytes: Whether to return bytes instead of string.
222
+
223
+ Returns:
224
+ JSON string or bytes depending on as_bytes parameter.
225
+ """
226
+ return get_default_serializer().encode(data, as_bytes=as_bytes)
227
+
228
+
229
+ def decode_json(data: Union[str, bytes], *, decode_bytes: bool = True) -> Any:
230
+ """Decode from JSON string or bytes efficiently.
231
+
232
+ Args:
233
+ data: JSON string or bytes to decode.
234
+ decode_bytes: Whether to decode bytes input.
235
+
236
+ Returns:
237
+ Decoded Python object.
238
+ """
239
+ return get_default_serializer().decode(data, decode_bytes=decode_bytes)
240
+
241
+
242
+ def convert_datetime_to_gmt_iso(dt: datetime.datetime) -> str: # pragma: no cover
243
+ """Handle datetime serialization for nested timestamps.
244
+
245
+ Args:
246
+ dt: The datetime to convert.
247
+
248
+ Returns:
249
+ The ISO formatted datetime string.
250
+ """
251
+ if not dt.tzinfo:
252
+ dt = dt.replace(tzinfo=datetime.timezone.utc)
253
+ return dt.isoformat().replace("+00:00", "Z")
254
+
255
+
256
+ def convert_date_to_iso(dt: datetime.date) -> str: # pragma: no cover
257
+ """Handle datetime serialization for nested timestamps.
258
+
259
+ Args:
260
+ dt: The date to convert.
261
+
262
+ Returns:
263
+ The ISO formatted date string.
264
+ """
265
+ return dt.isoformat()
266
+
267
+
268
+ __all__ = (
269
+ "BaseJSONSerializer",
270
+ "JSONSerializer",
271
+ "MsgspecSerializer",
272
+ "OrjsonSerializer",
273
+ "StandardLibSerializer",
274
+ "convert_date_to_iso",
275
+ "convert_datetime_to_gmt_iso",
276
+ "decode_json",
277
+ "encode_json",
278
+ "get_default_serializer",
279
+ )
@@ -40,6 +40,7 @@ from sqlspec.builder._expression_wrappers import (
40
40
  MathExpression,
41
41
  StringExpression,
42
42
  )
43
+ from sqlspec.builder._parsing_utils import extract_expression, to_expression
43
44
  from sqlspec.builder.mixins._join_operations import JoinBuilder
44
45
  from sqlspec.builder.mixins._select_operations import Case, SubqueryBuilder, WindowFunctionBuilder
45
46
  from sqlspec.core.statement import SQL
@@ -746,7 +747,7 @@ class SQLFactory:
746
747
  if isinstance(column, str) and column == "*":
747
748
  expr = exp.Count(this=exp.Star(), distinct=distinct)
748
749
  else:
749
- col_expr = self._extract_expression(column)
750
+ col_expr = extract_expression(column)
750
751
  expr = exp.Count(this=col_expr, distinct=distinct)
751
752
  return AggregateExpression(expr)
752
753
 
@@ -774,7 +775,7 @@ class SQLFactory:
774
775
  Returns:
775
776
  SUM expression.
776
777
  """
777
- col_expr = SQLFactory._extract_expression(column)
778
+ col_expr = extract_expression(column)
778
779
  return AggregateExpression(exp.Sum(this=col_expr, distinct=distinct))
779
780
 
780
781
  @staticmethod
@@ -787,7 +788,7 @@ class SQLFactory:
787
788
  Returns:
788
789
  AVG expression.
789
790
  """
790
- col_expr = SQLFactory._extract_expression(column)
791
+ col_expr = extract_expression(column)
791
792
  return AggregateExpression(exp.Avg(this=col_expr))
792
793
 
793
794
  @staticmethod
@@ -800,7 +801,7 @@ class SQLFactory:
800
801
  Returns:
801
802
  MAX expression.
802
803
  """
803
- col_expr = SQLFactory._extract_expression(column)
804
+ col_expr = extract_expression(column)
804
805
  return AggregateExpression(exp.Max(this=col_expr))
805
806
 
806
807
  @staticmethod
@@ -813,7 +814,7 @@ class SQLFactory:
813
814
  Returns:
814
815
  MIN expression.
815
816
  """
816
- col_expr = SQLFactory._extract_expression(column)
817
+ col_expr = extract_expression(column)
817
818
  return AggregateExpression(exp.Min(this=col_expr))
818
819
 
819
820
  @staticmethod
@@ -1034,45 +1035,6 @@ class SQLFactory:
1034
1035
  return FunctionExpression(value)
1035
1036
  return FunctionExpression(exp.convert(value))
1036
1037
 
1037
- @staticmethod
1038
- def _to_expression(value: Any) -> exp.Expression:
1039
- """Convert a Python value to a raw SQLGlot expression.
1040
-
1041
- Args:
1042
- value: Python value or SQLGlot expression to convert.
1043
-
1044
- Returns:
1045
- Raw SQLGlot expression.
1046
- """
1047
- if isinstance(value, exp.Expression):
1048
- return value
1049
- return exp.convert(value)
1050
-
1051
- @staticmethod
1052
- def _extract_expression(value: Any) -> exp.Expression:
1053
- """Extract SQLGlot expression from value, handling our wrapper types.
1054
-
1055
- Args:
1056
- value: String, SQLGlot expression, or our wrapper type.
1057
-
1058
- Returns:
1059
- Raw SQLGlot expression.
1060
- """
1061
- from sqlspec.builder._expression_wrappers import ExpressionWrapper
1062
- from sqlspec.builder.mixins._select_operations import Case
1063
-
1064
- if isinstance(value, str):
1065
- return exp.column(value)
1066
- if isinstance(value, Column):
1067
- return value.sqlglot_expression
1068
- if isinstance(value, ExpressionWrapper):
1069
- return value.expression
1070
- if isinstance(value, Case):
1071
- return exp.Case(ifs=value.conditions, default=value.default)
1072
- if isinstance(value, exp.Expression):
1073
- return value
1074
- return exp.convert(value)
1075
-
1076
1038
  @staticmethod
1077
1039
  def decode(column: Union[str, exp.Expression], *args: Union[str, exp.Expression, Any]) -> FunctionExpression:
1078
1040
  """Create a DECODE expression (Oracle-style conditional logic).
@@ -1109,14 +1071,14 @@ class SQLFactory:
1109
1071
 
1110
1072
  for i in range(0, len(args) - 1, 2):
1111
1073
  if i + 1 >= len(args):
1112
- default = SQLFactory._to_expression(args[i])
1074
+ default = to_expression(args[i])
1113
1075
  break
1114
1076
 
1115
1077
  search_val = args[i]
1116
1078
  result_val = args[i + 1]
1117
1079
 
1118
- search_expr = SQLFactory._to_expression(search_val)
1119
- result_expr = SQLFactory._to_expression(result_val)
1080
+ search_expr = to_expression(search_val)
1081
+ result_expr = to_expression(result_val)
1120
1082
 
1121
1083
  condition = exp.EQ(this=col_expr, expression=search_expr)
1122
1084
  conditions.append(exp.If(this=condition, true=result_expr))
@@ -1164,7 +1126,7 @@ class SQLFactory:
1164
1126
  COALESCE expression equivalent to NVL.
1165
1127
  """
1166
1128
  col_expr = exp.column(column) if isinstance(column, str) else column
1167
- sub_expr = SQLFactory._to_expression(substitute_value)
1129
+ sub_expr = to_expression(substitute_value)
1168
1130
  return ConversionExpression(exp.Coalesce(expressions=[col_expr, sub_expr]))
1169
1131
 
1170
1132
  @staticmethod
@@ -1192,8 +1154,8 @@ class SQLFactory:
1192
1154
  ```
1193
1155
  """
1194
1156
  col_expr = exp.column(column) if isinstance(column, str) else column
1195
- not_null_expr = SQLFactory._to_expression(value_if_not_null)
1196
- null_expr = SQLFactory._to_expression(value_if_null)
1157
+ not_null_expr = to_expression(value_if_not_null)
1158
+ null_expr = to_expression(value_if_null)
1197
1159
 
1198
1160
  is_null = exp.Is(this=col_expr, expression=exp.Null())
1199
1161
  condition = exp.Not(this=is_null)
@@ -177,6 +177,14 @@ except ImportError:
177
177
  MSGSPEC_INSTALLED = False # pyright: ignore[reportConstantRedefinition]
178
178
 
179
179
 
180
+ try:
181
+ import orjson # noqa: F401
182
+
183
+ ORJSON_INSTALLED = True # pyright: ignore[reportConstantRedefinition]
184
+ except ImportError:
185
+ ORJSON_INSTALLED = False # pyright: ignore[reportConstantRedefinition]
186
+
187
+
180
188
  # Always define stub type for DTOData
181
189
  @runtime_checkable
182
190
  class DTODataStub(Protocol[T]):
@@ -621,6 +629,7 @@ __all__ = (
621
629
  "NUMPY_INSTALLED",
622
630
  "OBSTORE_INSTALLED",
623
631
  "OPENTELEMETRY_INSTALLED",
632
+ "ORJSON_INSTALLED",
624
633
  "PGVECTOR_INSTALLED",
625
634
  "PROMETHEUS_INSTALLED",
626
635
  "PYARROW_INSTALLED",
@@ -77,6 +77,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
77
77
  migration_config: Optional[dict[str, Any]] = None,
78
78
  statement_config: Optional[StatementConfig] = None,
79
79
  driver_features: Optional[dict[str, Any]] = None,
80
+ bind_key: Optional[str] = None,
80
81
  ) -> None:
81
82
  """Initialize configuration.
82
83
 
@@ -85,6 +86,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
85
86
  migration_config: Migration configuration
86
87
  statement_config: Default SQL statement configuration
87
88
  driver_features: Driver feature configuration
89
+ bind_key: Optional unique identifier for this configuration
88
90
  """
89
91
  if connection_config is None:
90
92
  connection_config = {}
@@ -104,6 +106,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
104
106
  migration_config=migration_config,
105
107
  statement_config=statement_config,
106
108
  driver_features=driver_features or {},
109
+ bind_key=bind_key,
107
110
  )
108
111
 
109
112
  def _resolve_driver_name(self) -> str:
@@ -174,7 +177,11 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
174
177
  try:
175
178
  connect_func = import_string(driver_path)
176
179
  except ImportError as e:
177
- driver_path_with_suffix = f"{driver_path}.dbapi.connect"
180
+ # Only add .dbapi.connect if it's not already there
181
+ if not driver_path.endswith(".dbapi.connect"):
182
+ driver_path_with_suffix = f"{driver_path}.dbapi.connect"
183
+ else:
184
+ driver_path_with_suffix = driver_path
178
185
  try:
179
186
  connect_func = import_string(driver_path_with_suffix)
180
187
  except ImportError as e2: