sqlspec 0.14.1__tar.gz → 0.16.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.
- {sqlspec-0.14.1 → sqlspec-0.16.0}/.gitignore +7 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/.pre-commit-config.yaml +2 -2
- {sqlspec-0.14.1 → sqlspec-0.16.0}/Makefile +73 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/PKG-INFO +7 -2
- {sqlspec-0.14.1 → sqlspec-0.16.0}/pyproject.toml +71 -9
- sqlspec-0.16.0/sqlspec/__init__.py +92 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/__main__.py +1 -1
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/__metadata__.py +1 -3
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/_serialization.py +1 -2
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/_sql.py +480 -121
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/_typing.py +278 -142
- sqlspec-0.16.0/sqlspec/adapters/adbc/__init__.py +5 -0
- sqlspec-0.16.0/sqlspec/adapters/adbc/_types.py +12 -0
- sqlspec-0.16.0/sqlspec/adapters/adbc/config.py +361 -0
- sqlspec-0.16.0/sqlspec/adapters/adbc/driver.py +512 -0
- sqlspec-0.16.0/sqlspec/adapters/aiosqlite/__init__.py +19 -0
- sqlspec-0.16.0/sqlspec/adapters/aiosqlite/_types.py +13 -0
- sqlspec-0.16.0/sqlspec/adapters/aiosqlite/config.py +253 -0
- sqlspec-0.16.0/sqlspec/adapters/aiosqlite/driver.py +248 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncmy/__init__.py +19 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncmy/_types.py +12 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncmy/config.py +180 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncmy/driver.py +274 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncpg/__init__.py +21 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncpg/_types.py +17 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncpg/config.py +229 -0
- sqlspec-0.16.0/sqlspec/adapters/asyncpg/driver.py +344 -0
- sqlspec-0.16.0/sqlspec/adapters/bigquery/__init__.py +18 -0
- sqlspec-0.16.0/sqlspec/adapters/bigquery/_types.py +12 -0
- sqlspec-0.16.0/sqlspec/adapters/bigquery/config.py +298 -0
- sqlspec-0.16.0/sqlspec/adapters/bigquery/driver.py +558 -0
- sqlspec-0.16.0/sqlspec/adapters/duckdb/__init__.py +22 -0
- sqlspec-0.16.0/sqlspec/adapters/duckdb/_types.py +12 -0
- sqlspec-0.16.0/sqlspec/adapters/duckdb/config.py +504 -0
- sqlspec-0.16.0/sqlspec/adapters/duckdb/driver.py +368 -0
- sqlspec-0.16.0/sqlspec/adapters/oracledb/__init__.py +32 -0
- sqlspec-0.16.0/sqlspec/adapters/oracledb/_types.py +14 -0
- sqlspec-0.16.0/sqlspec/adapters/oracledb/config.py +317 -0
- sqlspec-0.16.0/sqlspec/adapters/oracledb/driver.py +538 -0
- sqlspec-0.16.0/sqlspec/adapters/psqlpy/__init__.py +16 -0
- sqlspec-0.16.0/sqlspec/adapters/psqlpy/_types.py +11 -0
- sqlspec-0.16.0/sqlspec/adapters/psqlpy/config.py +214 -0
- sqlspec-0.16.0/sqlspec/adapters/psqlpy/driver.py +530 -0
- sqlspec-0.16.0/sqlspec/adapters/psycopg/__init__.py +32 -0
- sqlspec-0.16.0/sqlspec/adapters/psycopg/_types.py +17 -0
- sqlspec-0.16.0/sqlspec/adapters/psycopg/config.py +426 -0
- sqlspec-0.16.0/sqlspec/adapters/psycopg/driver.py +796 -0
- sqlspec-0.16.0/sqlspec/adapters/sqlite/__init__.py +15 -0
- sqlspec-0.16.0/sqlspec/adapters/sqlite/_types.py +11 -0
- sqlspec-0.16.0/sqlspec/adapters/sqlite/config.py +240 -0
- sqlspec-0.16.0/sqlspec/adapters/sqlite/driver.py +294 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/base.py +105 -9
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/__init__.py +12 -14
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_base.py +120 -55
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_column.py +17 -6
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_ddl.py +46 -79
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_ddl_utils.py +5 -10
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_delete.py +6 -25
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_insert.py +18 -65
- sqlspec-0.16.0/sqlspec/builder/_merge.py +56 -0
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_parsing_utils.py +8 -11
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_select.py +11 -56
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/_update.py +12 -18
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/__init__.py +10 -14
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_cte_and_set_ops.py +48 -59
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_insert_operations.py +34 -18
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_join_operations.py +1 -3
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_merge_operations.py +19 -9
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_order_limit_operations.py +3 -3
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_pivot_operations.py +4 -8
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_select_operations.py +25 -38
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_update_operations.py +15 -16
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_where_clause.py +210 -137
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/cli.py +4 -5
- sqlspec-0.16.0/sqlspec/config.py +395 -0
- sqlspec-0.16.0/sqlspec/core/__init__.py +63 -0
- sqlspec-0.16.0/sqlspec/core/cache.py +873 -0
- sqlspec-0.16.0/sqlspec/core/compiler.py +396 -0
- sqlspec-0.16.0/sqlspec/core/filters.py +830 -0
- sqlspec-0.16.0/sqlspec/core/hashing.py +310 -0
- sqlspec-0.16.0/sqlspec/core/parameters.py +1209 -0
- sqlspec-0.16.0/sqlspec/core/result.py +664 -0
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec/core}/splitter.py +321 -191
- sqlspec-0.16.0/sqlspec/core/statement.py +666 -0
- sqlspec-0.16.0/sqlspec/driver/__init__.py +19 -0
- sqlspec-0.16.0/sqlspec/driver/_async.py +472 -0
- sqlspec-0.16.0/sqlspec/driver/_common.py +612 -0
- sqlspec-0.16.0/sqlspec/driver/_sync.py +473 -0
- sqlspec-0.16.0/sqlspec/driver/mixins/__init__.py +6 -0
- sqlspec-0.16.0/sqlspec/driver/mixins/_result_tools.py +164 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/driver/mixins/_sql_translator.py +6 -3
- sqlspec-0.16.0/sqlspec/exceptions.py +193 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/aiosql/adapter.py +93 -96
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/cli.py +1 -1
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/config.py +0 -1
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/handlers.py +15 -26
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/plugin.py +18 -16
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/providers.py +17 -52
- sqlspec-0.16.0/sqlspec/loader.py +760 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/migrations/__init__.py +12 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/migrations/base.py +92 -68
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/migrations/commands.py +24 -106
- sqlspec-0.16.0/sqlspec/migrations/loaders.py +402 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/migrations/runner.py +49 -51
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/migrations/tracker.py +31 -44
- sqlspec-0.16.0/sqlspec/migrations/utils.py +129 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/protocols.py +7 -183
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/__init__.py +1 -1
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/backends/base.py +37 -40
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/backends/fsspec.py +136 -112
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/backends/obstore.py +138 -160
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/capabilities.py +5 -4
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/registry.py +57 -106
- sqlspec-0.16.0/sqlspec/typing.py +299 -0
- sqlspec-0.16.0/sqlspec/utils/__init__.py +3 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/correlation.py +0 -3
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/deprecation.py +6 -6
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/fixtures.py +6 -6
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/logging.py +0 -2
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/module_loader.py +7 -12
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/singleton.py +0 -1
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/sync_tools.py +17 -38
- sqlspec-0.16.0/sqlspec/utils/text.py +96 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/type_guards.py +443 -232
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/example_usage.py +16 -16
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/sql_utils.py +5 -5
- sqlspec-0.16.0/tests/integration/__init__.py +1 -0
- sqlspec-0.16.0/tests/integration/conftest.py +39 -0
- sqlspec-0.16.0/tests/integration/test_adapters/__init__.py +1 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/__init__.py +1 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_adbc/conftest.py +4 -3
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_arrow_features.py +404 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_backends.py +254 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_connection.py +190 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_driver.py +424 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_edge_cases.py +537 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_adbc/test_adbc_results.py +398 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_aiosqlite/conftest.py +61 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_aiosqlite/test_connection.py +301 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_aiosqlite/test_driver.py +96 -109
- sqlspec-0.16.0/tests/integration/test_adapters/test_aiosqlite/test_pooling.py +212 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncmy/conftest.py +65 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncmy/test_asyncmy_features.py +335 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncmy/test_config.py +144 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncmy/test_driver.py +429 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncmy/test_parameter_styles.py +372 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_asyncpg/conftest.py +55 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncpg/test_connection.py +10 -6
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncpg/test_driver.py +132 -104
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncpg/test_execute_many.py +43 -34
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncpg/test_parameter_styles.py +107 -96
- sqlspec-0.16.0/tests/integration/test_adapters/test_bigquery/__init__.py +1 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_bigquery/conftest.py +75 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_bigquery/test_bigquery_features.py +363 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_bigquery/test_config.py +151 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_bigquery/test_connection.py +4 -4
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_bigquery/test_driver.py +56 -92
- sqlspec-0.16.0/tests/integration/test_adapters/test_bigquery/test_parameter_styles.py +193 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_duckdb/test_connection.py +180 -55
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_duckdb/test_driver.py +43 -217
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_duckdb/test_execute_many.py +10 -11
- sqlspec-0.16.0/tests/integration/test_adapters/test_duckdb/test_mixed_parameter_styles.py +164 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_duckdb/test_parameter_styles.py +107 -96
- sqlspec-0.16.0/tests/integration/test_adapters/test_duckdb/test_pooling.py +156 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_duckdb/utils.py +40 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/conftest.py +52 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_oracledb/test_connection.py +41 -37
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/test_driver_async.py +319 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/test_driver_sync.py +314 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/test_execute_many.py +365 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/test_oracle_features.py +404 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_oracledb/test_parameter_styles.py +347 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/__init__.py +1 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/conftest.py +47 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/test_connection.py +137 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/test_driver.py +468 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/test_parameter_styles.py +242 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psqlpy/test_psqlpy_features.py +250 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_psycopg/__init__.py +3 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/conftest.py +6 -12
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/test_async_copy.py +8 -18
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/test_connection.py +20 -20
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/test_driver.py +78 -131
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/test_execute_many.py +22 -22
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_psycopg/test_parameter_styles.py +162 -99
- sqlspec-0.16.0/tests/integration/test_adapters/test_sqlite/__init__.py +1 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_sqlite/conftest.py +121 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_sqlite/test_driver.py +40 -106
- sqlspec-0.16.0/tests/integration/test_adapters/test_sqlite/test_parameter_styles.py +229 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_sqlite/test_pooling.py +323 -0
- sqlspec-0.16.0/tests/integration/test_adapters/test_sqlite/test_query_mixin.py +221 -0
- sqlspec-0.16.0/tests/integration/test_loader/__init__.py +5 -0
- sqlspec-0.16.0/tests/integration/test_loader/test_file_system_loading.py +752 -0
- sqlspec-0.16.0/tests/integration/test_migrations/__init__.py +5 -0
- sqlspec-0.16.0/tests/integration/test_migrations/test_migration_execution.py +660 -0
- sqlspec-0.16.0/tests/unit/conftest.py +1017 -0
- sqlspec-0.16.0/tests/unit/test_adapters/__init__.py +3 -0
- sqlspec-0.16.0/tests/unit/test_adapters/conftest.py +446 -0
- sqlspec-0.16.0/tests/unit/test_adapters/test_adapter_implementations.py +477 -0
- sqlspec-0.16.0/tests/unit/test_adapters/test_async_adapters.py +615 -0
- sqlspec-0.16.0/tests/unit/test_adapters/test_sync_adapters.py +490 -0
- sqlspec-0.16.0/tests/unit/test_base/__init__.py +1 -0
- sqlspec-0.16.0/tests/unit/test_base/test_sqlspec_class.py +669 -0
- sqlspec-0.16.0/tests/unit/test_builder/__init__.py +1 -0
- sqlspec-0.16.0/tests/unit/test_builder/test_parameter_naming.py +392 -0
- sqlspec-0.16.0/tests/unit/test_builder_parameter_naming.py +222 -0
- sqlspec-0.16.0/tests/unit/test_core/test_cache.py +1031 -0
- sqlspec-0.16.0/tests/unit/test_core/test_compiler.py +861 -0
- sqlspec-0.16.0/tests/unit/test_core/test_filters.py +257 -0
- sqlspec-0.16.0/tests/unit/test_core/test_hashing.py +577 -0
- sqlspec-0.16.0/tests/unit/test_core/test_parameters.py +1181 -0
- sqlspec-0.16.0/tests/unit/test_core/test_result.py +151 -0
- sqlspec-0.16.0/tests/unit/test_core/test_statement.py +1146 -0
- sqlspec-0.16.0/tests/unit/test_loader/__init__.py +5 -0
- sqlspec-0.16.0/tests/unit/test_loader/test_cache_integration.py +682 -0
- sqlspec-0.16.0/tests/unit/test_loader/test_loading_patterns.py +888 -0
- sqlspec-0.16.0/tests/unit/test_loader/test_sql_file_loader.py +962 -0
- sqlspec-0.16.0/tests/unit/test_migrations/__init__.py +10 -0
- sqlspec-0.16.0/tests/unit/test_migrations/test_migration.py +763 -0
- sqlspec-0.16.0/tests/unit/test_migrations/test_migration_execution.py +671 -0
- sqlspec-0.16.0/tests/unit/test_migrations/test_migration_runner.py +587 -0
- sqlspec-0.16.0/tests/unit/test_sql_factory.py +462 -0
- sqlspec-0.16.0/tests/unit/test_utils/__init__.py +1 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_correlation.py +508 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_deprecation.py +151 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_fixtures.py +74 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_logging.py +702 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_module_loader.py +100 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_serializers.py +487 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_singleton.py +98 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_sync_tools.py +400 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_text.py +316 -0
- sqlspec-0.16.0/tests/unit/test_utils/test_type_guards.py +933 -0
- sqlspec-0.16.0/tools/local-infra.sh +686 -0
- sqlspec-0.16.0/tools/sphinx_ext/missing_references.py +382 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/uv.lock +1998 -1273
- sqlspec-0.14.1/sqlspec/__init__.py +0 -67
- sqlspec-0.14.1/sqlspec/adapters/adbc/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/adapters/adbc/config.py +0 -506
- sqlspec-0.14.1/sqlspec/adapters/adbc/driver.py +0 -417
- sqlspec-0.14.1/sqlspec/adapters/adbc/transformers.py +0 -108
- sqlspec-0.14.1/sqlspec/adapters/aiosqlite/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/adapters/aiosqlite/config.py +0 -183
- sqlspec-0.14.1/sqlspec/adapters/aiosqlite/driver.py +0 -287
- sqlspec-0.14.1/sqlspec/adapters/asyncmy/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/adapters/asyncmy/config.py +0 -268
- sqlspec-0.14.1/sqlspec/adapters/asyncmy/driver.py +0 -239
- sqlspec-0.14.1/sqlspec/adapters/asyncpg/__init__.py +0 -6
- sqlspec-0.14.1/sqlspec/adapters/asyncpg/config.py +0 -328
- sqlspec-0.14.1/sqlspec/adapters/asyncpg/driver.py +0 -442
- sqlspec-0.14.1/sqlspec/adapters/bigquery/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/adapters/bigquery/config.py +0 -365
- sqlspec-0.14.1/sqlspec/adapters/bigquery/driver.py +0 -730
- sqlspec-0.14.1/sqlspec/adapters/duckdb/__init__.py +0 -11
- sqlspec-0.14.1/sqlspec/adapters/duckdb/config.py +0 -440
- sqlspec-0.14.1/sqlspec/adapters/duckdb/driver.py +0 -438
- sqlspec-0.14.1/sqlspec/adapters/oracledb/__init__.py +0 -18
- sqlspec-0.14.1/sqlspec/adapters/oracledb/config.py +0 -573
- sqlspec-0.14.1/sqlspec/adapters/oracledb/driver.py +0 -591
- sqlspec-0.14.1/sqlspec/adapters/psqlpy/__init__.py +0 -6
- sqlspec-0.14.1/sqlspec/adapters/psqlpy/config.py +0 -375
- sqlspec-0.14.1/sqlspec/adapters/psqlpy/driver.py +0 -259
- sqlspec-0.14.1/sqlspec/adapters/psycopg/__init__.py +0 -18
- sqlspec-0.14.1/sqlspec/adapters/psycopg/config.py +0 -686
- sqlspec-0.14.1/sqlspec/adapters/psycopg/driver.py +0 -962
- sqlspec-0.14.1/sqlspec/adapters/sqlite/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/adapters/sqlite/config.py +0 -156
- sqlspec-0.14.1/sqlspec/adapters/sqlite/driver.py +0 -333
- sqlspec-0.14.1/sqlspec/config.py +0 -348
- sqlspec-0.14.1/sqlspec/driver/__init__.py +0 -22
- sqlspec-0.14.1/sqlspec/driver/_async.py +0 -261
- sqlspec-0.14.1/sqlspec/driver/_common.py +0 -374
- sqlspec-0.14.1/sqlspec/driver/_sync.py +0 -255
- sqlspec-0.14.1/sqlspec/driver/connection.py +0 -207
- sqlspec-0.14.1/sqlspec/driver/mixins/__init__.py +0 -23
- sqlspec-0.14.1/sqlspec/driver/mixins/_cache.py +0 -114
- sqlspec-0.14.1/sqlspec/driver/mixins/_csv_writer.py +0 -91
- sqlspec-0.14.1/sqlspec/driver/mixins/_pipeline.py +0 -508
- sqlspec-0.14.1/sqlspec/driver/mixins/_query_tools.py +0 -796
- sqlspec-0.14.1/sqlspec/driver/mixins/_result_utils.py +0 -138
- sqlspec-0.14.1/sqlspec/driver/mixins/_storage.py +0 -912
- sqlspec-0.14.1/sqlspec/driver/mixins/_type_coercion.py +0 -128
- sqlspec-0.14.1/sqlspec/driver/parameters.py +0 -138
- sqlspec-0.14.1/sqlspec/exceptions.py +0 -440
- sqlspec-0.14.1/sqlspec/loader.py +0 -441
- sqlspec-0.14.1/sqlspec/migrations/utils.py +0 -89
- sqlspec-0.14.1/sqlspec/statement/__init__.py +0 -21
- sqlspec-0.14.1/sqlspec/statement/builder/_merge.py +0 -95
- sqlspec-0.14.1/sqlspec/statement/cache.py +0 -50
- sqlspec-0.14.1/sqlspec/statement/filters.py +0 -625
- sqlspec-0.14.1/sqlspec/statement/parameters.py +0 -956
- sqlspec-0.14.1/sqlspec/statement/pipelines/__init__.py +0 -210
- sqlspec-0.14.1/sqlspec/statement/pipelines/analyzers/__init__.py +0 -9
- sqlspec-0.14.1/sqlspec/statement/pipelines/analyzers/_analyzer.py +0 -646
- sqlspec-0.14.1/sqlspec/statement/pipelines/context.py +0 -109
- sqlspec-0.14.1/sqlspec/statement/pipelines/transformers/__init__.py +0 -7
- sqlspec-0.14.1/sqlspec/statement/pipelines/transformers/_expression_simplifier.py +0 -88
- sqlspec-0.14.1/sqlspec/statement/pipelines/transformers/_literal_parameterizer.py +0 -1247
- sqlspec-0.14.1/sqlspec/statement/pipelines/transformers/_remove_comments_and_hints.py +0 -76
- sqlspec-0.14.1/sqlspec/statement/pipelines/validators/__init__.py +0 -23
- sqlspec-0.14.1/sqlspec/statement/pipelines/validators/_dml_safety.py +0 -290
- sqlspec-0.14.1/sqlspec/statement/pipelines/validators/_parameter_style.py +0 -370
- sqlspec-0.14.1/sqlspec/statement/pipelines/validators/_performance.py +0 -714
- sqlspec-0.14.1/sqlspec/statement/pipelines/validators/_security.py +0 -967
- sqlspec-0.14.1/sqlspec/statement/result.py +0 -435
- sqlspec-0.14.1/sqlspec/statement/sql.py +0 -1774
- sqlspec-0.14.1/sqlspec/typing.py +0 -278
- sqlspec-0.14.1/sqlspec/utils/__init__.py +0 -4
- sqlspec-0.14.1/sqlspec/utils/cached_property.py +0 -25
- sqlspec-0.14.1/sqlspec/utils/statement_hashing.py +0 -203
- sqlspec-0.14.1/sqlspec/utils/text.py +0 -135
- sqlspec-0.14.1/tests/integration/__init__.py +0 -3
- sqlspec-0.14.1/tests/integration/test_adapters/__init__.py +0 -1
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/__init__.py +0 -5
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_arrow_functionality.py +0 -199
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_bigquery_driver.py +0 -289
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_connection.py +0 -85
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_data_types.py +0 -270
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_driver.py +0 -954
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_duckdb_driver.py +0 -371
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_execute_many.py +0 -195
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_execute_script.py +0 -254
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_null_params.py +0 -121
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_parameter_styles.py +0 -186
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_postgres_driver.py +0 -1163
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_returning.py +0 -128
- sqlspec-0.14.1/tests/integration/test_adapters/test_adbc/test_sqlite_driver.py +0 -491
- sqlspec-0.14.1/tests/integration/test_adapters/test_asyncmy/test_config.py +0 -154
- sqlspec-0.14.1/tests/integration/test_adapters/test_asyncpg/conftest.py +0 -50
- sqlspec-0.14.1/tests/integration/test_adapters/test_asyncpg/test_arrow_functionality.py +0 -210
- sqlspec-0.14.1/tests/integration/test_adapters/test_bigquery/conftest.py +0 -31
- sqlspec-0.14.1/tests/integration/test_adapters/test_bigquery/test_arrow_functionality.py +0 -353
- sqlspec-0.14.1/tests/integration/test_adapters/test_duckdb/test_arrow_functionality.py +0 -440
- sqlspec-0.14.1/tests/integration/test_adapters/test_duckdb/test_mixed_parameter_styles.py +0 -145
- sqlspec-0.14.1/tests/integration/test_adapters/test_oracledb/test_driver_async.py +0 -385
- sqlspec-0.14.1/tests/integration/test_adapters/test_oracledb/test_driver_sync.py +0 -352
- sqlspec-0.14.1/tests/integration/test_adapters/test_psqlpy/__init__.py +0 -0
- sqlspec-0.14.1/tests/integration/test_adapters/test_psqlpy/test_arrow_functionality.py +0 -421
- sqlspec-0.14.1/tests/integration/test_adapters/test_psqlpy/test_connection.py +0 -72
- sqlspec-0.14.1/tests/integration/test_adapters/test_psqlpy/test_driver.py +0 -499
- sqlspec-0.14.1/tests/integration/test_adapters/test_psycopg/__init__.py +0 -5
- sqlspec-0.14.1/tests/integration/test_adapters/test_sqlite/__init__.py +0 -1
- sqlspec-0.14.1/tests/integration/test_adapters/test_sqlite/test_query_mixin.py +0 -223
- sqlspec-0.14.1/tests/integration/test_dialect_propagation.py +0 -340
- sqlspec-0.14.1/tests/integration/test_driver_mixins/__init__.py +0 -1
- sqlspec-0.14.1/tests/integration/test_extensions/__init__.py +0 -0
- sqlspec-0.14.1/tests/integration/test_extensions/test_aiosql/__init__.py +0 -0
- sqlspec-0.14.1/tests/integration/test_extensions/test_litestar/__init__.py +0 -0
- sqlspec-0.14.1/tests/integration/test_sql_file_loader.py +0 -627
- sqlspec-0.14.1/tests/integration/test_storage/__init__.py +0 -1
- sqlspec-0.14.1/tests/integration/test_storage/test_driver_storage_integration.py +0 -431
- sqlspec-0.14.1/tests/integration/test_storage/test_end_to_end_workflows.py +0 -558
- sqlspec-0.14.1/tests/integration/test_storage/test_storage_mixins.py +0 -519
- sqlspec-0.14.1/tests/unit/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/statement/test_cache.py +0 -231
- sqlspec-0.14.1/tests/unit/test_adapters/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_adbc/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_adbc/test_config.py +0 -127
- sqlspec-0.14.1/tests/unit/test_adapters/test_adbc/test_driver.py +0 -528
- sqlspec-0.14.1/tests/unit/test_adapters/test_adbc/test_transformers.py +0 -147
- sqlspec-0.14.1/tests/unit/test_adapters/test_aiosqlite/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_aiosqlite/test_config.py +0 -105
- sqlspec-0.14.1/tests/unit/test_adapters/test_aiosqlite/test_driver.py +0 -198
- sqlspec-0.14.1/tests/unit/test_adapters/test_asyncmy/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_asyncmy/test_driver.py +0 -248
- sqlspec-0.14.1/tests/unit/test_adapters/test_asyncpg/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_asyncpg/test_config.py +0 -546
- sqlspec-0.14.1/tests/unit/test_adapters/test_asyncpg/test_driver.py +0 -483
- sqlspec-0.14.1/tests/unit/test_adapters/test_bigquery/__init__.py +0 -1
- sqlspec-0.14.1/tests/unit/test_adapters/test_bigquery/test_config.py +0 -389
- sqlspec-0.14.1/tests/unit/test_adapters/test_bigquery/test_driver.py +0 -616
- sqlspec-0.14.1/tests/unit/test_adapters/test_cache_mixin.py +0 -203
- sqlspec-0.14.1/tests/unit/test_adapters/test_duckdb/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_duckdb/test_config.py +0 -468
- sqlspec-0.14.1/tests/unit/test_adapters/test_duckdb/test_driver.py +0 -596
- sqlspec-0.14.1/tests/unit/test_adapters/test_oracledb/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_oracledb/test_config.py +0 -145
- sqlspec-0.14.1/tests/unit/test_adapters/test_oracledb/test_driver.py +0 -128
- sqlspec-0.14.1/tests/unit/test_adapters/test_psqlpy/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_psqlpy/test_config.py +0 -151
- sqlspec-0.14.1/tests/unit/test_adapters/test_psqlpy/test_driver.py +0 -104
- sqlspec-0.14.1/tests/unit/test_adapters/test_psycopg/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_psycopg/test_config.py +0 -740
- sqlspec-0.14.1/tests/unit/test_adapters/test_psycopg/test_driver.py +0 -686
- sqlspec-0.14.1/tests/unit/test_adapters/test_sqlite/__init__.py +0 -3
- sqlspec-0.14.1/tests/unit/test_adapters/test_sqlite/test_config.py +0 -319
- sqlspec-0.14.1/tests/unit/test_adapters/test_sqlite/test_driver.py +0 -456
- sqlspec-0.14.1/tests/unit/test_base.py +0 -554
- sqlspec-0.14.1/tests/unit/test_config.py +0 -523
- sqlspec-0.14.1/tests/unit/test_config_dialect.py +0 -407
- sqlspec-0.14.1/tests/unit/test_driver.py +0 -817
- sqlspec-0.14.1/tests/unit/test_driver_mixins/__init__.py +0 -1
- sqlspec-0.14.1/tests/unit/test_driver_mixins/test_query_mixin.py +0 -336
- sqlspec-0.14.1/tests/unit/test_exceptions.py +0 -862
- sqlspec-0.14.1/tests/unit/test_extensions/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/test_extensions/test_aiosql/test_adapter.py +0 -409
- sqlspec-0.14.1/tests/unit/test_loader.py +0 -494
- sqlspec-0.14.1/tests/unit/test_statement/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/test_statement/test_base.py +0 -510
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_base.py +0 -793
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_builder_mixins.py +0 -999
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_column.py +0 -302
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_delete.py +0 -318
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_dynamic_columns.py +0 -220
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_insert.py +0 -477
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_merge.py +0 -577
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_select.py +0 -672
- sqlspec-0.14.1/tests/unit/test_statement/test_builder/test_update.py +0 -525
- sqlspec-0.14.1/tests/unit/test_statement/test_config.py +0 -515
- sqlspec-0.14.1/tests/unit/test_statement/test_filters.py +0 -512
- sqlspec-0.14.1/tests/unit/test_statement/test_mixins.py +0 -364
- sqlspec-0.14.1/tests/unit/test_statement/test_oracle_numeric_parameters.py +0 -331
- sqlspec-0.14.1/tests/unit/test_statement/test_parameter_normalization.py +0 -122
- sqlspec-0.14.1/tests/unit/test_statement/test_parameter_preservation.py +0 -139
- sqlspec-0.14.1/tests/unit/test_statement/test_parameters.py +0 -513
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_analyzer.py +0 -566
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_analyzer_subquery_detection.py +0 -374
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_expression_simplifier.py +0 -479
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_literal_parameterizer_duplication.py +0 -104
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_transformers_literal_parameterizer.py +0 -651
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_transformers_literal_parameterizer_cte.py +0 -216
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_transformers_remove_comments.py +0 -550
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_validators_dml_safety.py +0 -496
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_validators_parameter_style.py +0 -440
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_validators_performance.py +0 -580
- sqlspec-0.14.1/tests/unit/test_statement/test_pipelines/test_validators_security.py +0 -608
- sqlspec-0.14.1/tests/unit/test_statement/test_result.py +0 -547
- sqlspec-0.14.1/tests/unit/test_statement/test_splitter.py +0 -450
- sqlspec-0.14.1/tests/unit/test_statement/test_sql.py +0 -422
- sqlspec-0.14.1/tests/unit/test_statement/test_sql_as_many.py +0 -102
- sqlspec-0.14.1/tests/unit/test_statement/test_sql_translator_mixin.py +0 -290
- sqlspec-0.14.1/tests/unit/test_statement/test_sqlfactory.py +0 -95
- sqlspec-0.14.1/tests/unit/test_statement/test_storage.py +0 -235
- sqlspec-0.14.1/tests/unit/test_statement/test_transformers/test_expression_simplifier_parameter_tracking.py +0 -129
- sqlspec-0.14.1/tests/unit/test_statement/test_typed_parameter.py +0 -226
- sqlspec-0.14.1/tests/unit/test_storage/__init__.py +0 -1
- sqlspec-0.14.1/tests/unit/test_storage/test_backends/__init__.py +0 -1
- sqlspec-0.14.1/tests/unit/test_storage/test_backends/test_fsspec_backend.py +0 -763
- sqlspec-0.14.1/tests/unit/test_storage/test_backends/test_obstore_backend.py +0 -1164
- sqlspec-0.14.1/tests/unit/test_storage/test_base.py +0 -431
- sqlspec-0.14.1/tests/unit/test_storage/test_registry.py +0 -413
- sqlspec-0.14.1/tests/unit/test_typing.py +0 -271
- sqlspec-0.14.1/tests/unit/test_utils/__init__.py +0 -0
- sqlspec-0.14.1/tests/unit/test_utils/test_deprecation.py +0 -365
- sqlspec-0.14.1/tests/unit/test_utils/test_fixtures.py +0 -305
- sqlspec-0.14.1/tests/unit/test_utils/test_module_loader.py +0 -359
- sqlspec-0.14.1/tests/unit/test_utils/test_singleton.py +0 -324
- sqlspec-0.14.1/tests/unit/test_utils/test_sync_tools.py +0 -474
- sqlspec-0.14.1/tests/unit/test_utils/test_text.py +0 -315
- sqlspec-0.14.1/tests/unit/utils/test_ast_hashing.py +0 -145
- sqlspec-0.14.1/tools/__init__.py +0 -0
- sqlspec-0.14.1/tools/sphinx_ext/missing_references.py +0 -127
- {sqlspec-0.14.1 → sqlspec-0.16.0}/CONTRIBUTING.rst +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/LICENSE +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/NOTICE +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/README.md +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/adapters/__init__.py +0 -0
- {sqlspec-0.14.1/sqlspec/statement → sqlspec-0.16.0/sqlspec}/builder/mixins/_delete_operations.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/aiosql/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/extensions/litestar/_utils.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/py.typed +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/storage/backends/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/sqlspec/utils/serializers.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/conftest.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/ddls-mysql-collection.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/ddls-postgres-collection.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/init.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-config.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-data_types.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-database_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-engines.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-hostname.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-plugins.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-process_list.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-resource-groups.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-schema_objects.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-table_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/collection-users.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/mysql/init.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/oracle.ddl.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-applications.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-aws_extension_dependency.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-aws_oracle_exists.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-bg_writer_stats.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-calculated_metrics.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-data_types.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-database_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-extensions.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-index_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-pglogical-details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-privileges.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-replication_slots.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-replication_stats.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-schema_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-schema_objects.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-settings.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-source_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/collection-table_details.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/extended-collection-all-databases.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/postgres/init.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/fixtures/readiness-check.sql +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_aiosqlite/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncmy/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_asyncpg/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_duckdb/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tests/integration/test_adapters/test_oracledb/__init__.py +0 -0
- {sqlspec-0.14.1/tests/integration/test_adapters/test_bigquery → sqlspec-0.16.0/tools}/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tools/build_docs.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tools/pypi_readme.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tools/sphinx_ext/__init__.py +0 -0
- {sqlspec-0.14.1 → sqlspec-0.16.0}/tools/sphinx_ext/changelog.py +0 -0
|
@@ -7,7 +7,7 @@ repos:
|
|
|
7
7
|
- id: conventional-pre-commit
|
|
8
8
|
stages: [commit-msg]
|
|
9
9
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
-
rev:
|
|
10
|
+
rev: v6.0.0
|
|
11
11
|
hooks:
|
|
12
12
|
- id: check-ast
|
|
13
13
|
- id: check-case-conflict
|
|
@@ -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.12.
|
|
20
|
+
rev: "v0.12.8"
|
|
21
21
|
hooks:
|
|
22
22
|
- id: ruff
|
|
23
23
|
args: ["--fix"]
|
|
@@ -48,6 +48,18 @@ install: destroy clean ## Install the project, depe
|
|
|
48
48
|
@uv sync --all-extras --dev
|
|
49
49
|
@echo "${OK} Installation complete! 🎉"
|
|
50
50
|
|
|
51
|
+
.PHONY: install-compiled
|
|
52
|
+
install-compiled: destroy clean ## Install with mypyc compilation for performance
|
|
53
|
+
@echo "${INFO} Starting fresh installation with mypyc compilation..."
|
|
54
|
+
@uv python pin 3.12 >/dev/null 2>&1
|
|
55
|
+
@uv venv >/dev/null 2>&1
|
|
56
|
+
@echo "${INFO} Installing in editable mode with mypyc compilation..."
|
|
57
|
+
@HATCH_BUILD_HOOKS_ENABLE=1 uv pip install -e .
|
|
58
|
+
@uv sync --all-extras --dev
|
|
59
|
+
@echo "${OK} Performance installation complete! 🚀"
|
|
60
|
+
@echo "${INFO} Verifying compilation..."
|
|
61
|
+
@find sqlspec -name "*.so" | wc -l | xargs -I {} echo "${OK} Compiled {} modules"
|
|
62
|
+
|
|
51
63
|
.PHONY: destroy
|
|
52
64
|
destroy: ## Destroy the virtual environment
|
|
53
65
|
@echo "${INFO} Destroying virtual environment... 🗑️"
|
|
@@ -83,6 +95,22 @@ build: ## Build the package
|
|
|
83
95
|
@uv build >/dev/null 2>&1
|
|
84
96
|
@echo "${OK} Package build complete"
|
|
85
97
|
|
|
98
|
+
.PHONY: build-performance
|
|
99
|
+
build-performance: ## Build package with mypyc compilation
|
|
100
|
+
@echo "${INFO} Building package with mypyc compilation... 📦"
|
|
101
|
+
@HATCH_BUILD_HOOKS_ENABLE=1 uv build >/dev/null 2>&1
|
|
102
|
+
@echo "${OK} Performance package build complete 🚀"
|
|
103
|
+
|
|
104
|
+
.PHONY: test-mypyc
|
|
105
|
+
test-mypyc: ## Test mypyc compilation on individual modules
|
|
106
|
+
@echo "${INFO} Testing mypyc compilation... 🔧"
|
|
107
|
+
@uv run mypyc --check-untyped-defs sqlspec/utils/statement_hashing.py
|
|
108
|
+
@uv run mypyc --check-untyped-defs sqlspec/utils/text.py
|
|
109
|
+
@uv run mypyc --check-untyped-defs sqlspec/utils/sync_tools.py
|
|
110
|
+
@uv run mypyc --check-untyped-defs sqlspec/statement/cache.py
|
|
111
|
+
@echo "${OK} Mypyc compilation tests passed ✨"
|
|
112
|
+
|
|
113
|
+
|
|
86
114
|
.PHONY: release
|
|
87
115
|
release: ## Bump version and create release tag
|
|
88
116
|
@echo "${INFO} Preparing for release... 📦"
|
|
@@ -108,6 +136,8 @@ clean: ## Cleanup temporary build a
|
|
|
108
136
|
@find . -name '*~' -exec rm -f {} + >/dev/null 2>&1
|
|
109
137
|
@find . -name '__pycache__' -exec rm -rf {} + >/dev/null 2>&1
|
|
110
138
|
@find . -name '.ipynb_checkpoints' -exec rm -rf {} + >/dev/null 2>&1
|
|
139
|
+
@find . -name '*.so' -exec rm -f {} + >/dev/null 2>&1
|
|
140
|
+
@find . -name '*.c' -exec rm -f {} + >/dev/null 2>&1
|
|
111
141
|
@echo "${OK} Working directory cleaned"
|
|
112
142
|
$(MAKE) docs-clean
|
|
113
143
|
|
|
@@ -215,6 +245,49 @@ docs-linkcheck-full: ## Run full documentation lin
|
|
|
215
245
|
@uv run sphinx-build -b linkcheck ./docs ./docs/_build -D linkcheck_anchors=0
|
|
216
246
|
@echo "${OK} Full link check complete"
|
|
217
247
|
|
|
248
|
+
# =============================================================================
|
|
249
|
+
# Development Infrastructure
|
|
250
|
+
# =============================================================================
|
|
251
|
+
|
|
252
|
+
.PHONY: infra-up
|
|
253
|
+
infra-up: ## Start development infrastructure (databases, storage)
|
|
254
|
+
@echo "${INFO} Starting development infrastructure..."
|
|
255
|
+
@./tools/local-infra.sh up
|
|
256
|
+
@echo "${OK} Development infrastructure ready ✨"
|
|
257
|
+
|
|
258
|
+
.PHONY: infra-down
|
|
259
|
+
infra-down: ## Stop development infrastructure
|
|
260
|
+
@echo "${INFO} Stopping development infrastructure..."
|
|
261
|
+
@./tools/local-infra.sh down --quiet
|
|
262
|
+
@echo "${OK} Development infrastructure stopped"
|
|
263
|
+
|
|
264
|
+
.PHONY: infra-status
|
|
265
|
+
infra-status: ## Show development infrastructure status
|
|
266
|
+
@./tools/local-infra.sh status
|
|
267
|
+
|
|
268
|
+
.PHONY: infra-cleanup
|
|
269
|
+
infra-cleanup: ## Clean up development infrastructure
|
|
270
|
+
@echo "${WARN} This will remove all development containers and volumes"
|
|
271
|
+
@./tools/local-infra.sh cleanup
|
|
272
|
+
|
|
273
|
+
.PHONY: infra-postgres
|
|
274
|
+
infra-postgres: ## Start only PostgreSQL
|
|
275
|
+
@echo "${INFO} Starting PostgreSQL..."
|
|
276
|
+
@./tools/local-infra.sh up postgres --quiet
|
|
277
|
+
@echo "${OK} PostgreSQL ready on port 5433"
|
|
278
|
+
|
|
279
|
+
.PHONY: infra-oracle
|
|
280
|
+
infra-oracle: ## Start only Oracle
|
|
281
|
+
@echo "${INFO} Starting Oracle..."
|
|
282
|
+
@./tools/local-infra.sh up oracle --quiet
|
|
283
|
+
@echo "${OK} Oracle ready on port 1522"
|
|
284
|
+
|
|
285
|
+
.PHONY: infra-mysql
|
|
286
|
+
infra-mysql: ## Start only MySQL
|
|
287
|
+
@echo "${INFO} Starting MySQL..."
|
|
288
|
+
@./tools/local-infra.sh up mysql --quiet
|
|
289
|
+
@echo "${OK} MySQL ready on port 3307"
|
|
290
|
+
|
|
218
291
|
# =============================================================================
|
|
219
292
|
# End of Makefile
|
|
220
293
|
# =============================================================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlspec
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.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/
|
|
@@ -11,8 +11,9 @@ License-Expression: MIT
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: NOTICE
|
|
13
13
|
Requires-Python: <4.0,>=3.9
|
|
14
|
-
Requires-Dist: click
|
|
15
14
|
Requires-Dist: eval-type-backport; python_version < '3.10'
|
|
15
|
+
Requires-Dist: mypy-extensions
|
|
16
|
+
Requires-Dist: rich-click
|
|
16
17
|
Requires-Dist: sqlglot>=19.9.0
|
|
17
18
|
Requires-Dist: typing-extensions
|
|
18
19
|
Provides-Extra: adbc
|
|
@@ -28,6 +29,9 @@ Provides-Extra: asyncmy
|
|
|
28
29
|
Requires-Dist: asyncmy; extra == 'asyncmy'
|
|
29
30
|
Provides-Extra: asyncpg
|
|
30
31
|
Requires-Dist: asyncpg; extra == 'asyncpg'
|
|
32
|
+
Provides-Extra: attrs
|
|
33
|
+
Requires-Dist: attrs; extra == 'attrs'
|
|
34
|
+
Requires-Dist: cattrs; extra == 'attrs'
|
|
31
35
|
Provides-Extra: bigquery
|
|
32
36
|
Requires-Dist: google-cloud-bigquery; extra == 'bigquery'
|
|
33
37
|
Provides-Extra: cli
|
|
@@ -44,6 +48,7 @@ Provides-Extra: litestar
|
|
|
44
48
|
Requires-Dist: litestar; extra == 'litestar'
|
|
45
49
|
Provides-Extra: msgspec
|
|
46
50
|
Requires-Dist: msgspec; extra == 'msgspec'
|
|
51
|
+
Provides-Extra: mypyc
|
|
47
52
|
Provides-Extra: nanoid
|
|
48
53
|
Requires-Dist: fastnanoid>=0.4.1; extra == 'nanoid'
|
|
49
54
|
Provides-Extra: obstore
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
authors = [{ name = "Cody Fincher", email = "cody@litestar.dev" }]
|
|
3
|
-
dependencies = [
|
|
3
|
+
dependencies = [
|
|
4
|
+
"typing-extensions",
|
|
5
|
+
"eval_type_backport; python_version < \"3.10\"",
|
|
6
|
+
"sqlglot>=19.9.0",
|
|
7
|
+
"mypy-extensions",
|
|
8
|
+
"rich-click",
|
|
9
|
+
]
|
|
4
10
|
description = "SQL Experiments in Python"
|
|
5
11
|
license = "MIT"
|
|
6
12
|
maintainers = [{ name = "Litestar Developers", email = "hello@litestar.dev" }]
|
|
7
13
|
name = "sqlspec"
|
|
8
14
|
readme = "README.md"
|
|
9
15
|
requires-python = ">=3.9, <4.0"
|
|
10
|
-
version = "0.
|
|
16
|
+
version = "0.16.0"
|
|
11
17
|
|
|
12
18
|
[project.urls]
|
|
13
19
|
Discord = "https://discord.gg/litestar"
|
|
@@ -21,6 +27,7 @@ aiosql = ["aiosql"]
|
|
|
21
27
|
aiosqlite = ["aiosqlite"]
|
|
22
28
|
asyncmy = ["asyncmy"]
|
|
23
29
|
asyncpg = ["asyncpg"]
|
|
30
|
+
attrs = ["attrs", "cattrs"]
|
|
24
31
|
bigquery = ["google-cloud-bigquery"]
|
|
25
32
|
cli = ["rich-click"]
|
|
26
33
|
duckdb = ["duckdb"]
|
|
@@ -29,6 +36,7 @@ flask = ["flask"]
|
|
|
29
36
|
fsspec = ["fsspec"]
|
|
30
37
|
litestar = ["litestar"]
|
|
31
38
|
msgspec = ["msgspec"]
|
|
39
|
+
mypyc = []
|
|
32
40
|
nanoid = ["fastnanoid>=0.4.1"]
|
|
33
41
|
obstore = ["obstore"]
|
|
34
42
|
opentelemetry = ["opentelemetry-instrumentation"]
|
|
@@ -46,10 +54,9 @@ pymysql = ["pymysql"]
|
|
|
46
54
|
spanner = ["google-cloud-spanner"]
|
|
47
55
|
uuid = ["uuid-utils"]
|
|
48
56
|
|
|
49
|
-
|
|
50
57
|
[dependency-groups]
|
|
51
|
-
benchmarks = ["sqlalchemy", "psutil", "types-psutil"]
|
|
52
|
-
build = ["bump-my-version"]
|
|
58
|
+
benchmarks = ["sqlalchemy[asyncio]", "psutil", "types-psutil", "rich", "rich-click", "duckdb"]
|
|
59
|
+
build = ["bump-my-version", "hatch-mypyc", "pydantic-settings"]
|
|
53
60
|
dev = [
|
|
54
61
|
{ include-group = "extras" },
|
|
55
62
|
{ include-group = "lint" },
|
|
@@ -76,6 +83,7 @@ doc = [
|
|
|
76
83
|
]
|
|
77
84
|
extras = [
|
|
78
85
|
"adbc_driver_manager",
|
|
86
|
+
"pgvector",
|
|
79
87
|
"pyarrow",
|
|
80
88
|
"polars",
|
|
81
89
|
"adbc_driver_sqlite",
|
|
@@ -95,8 +103,11 @@ lint = [
|
|
|
95
103
|
"types-protobuf",
|
|
96
104
|
"asyncpg-stubs",
|
|
97
105
|
"pyarrow-stubs",
|
|
106
|
+
|
|
98
107
|
]
|
|
99
108
|
test = [
|
|
109
|
+
"aiohttp",
|
|
110
|
+
"requests",
|
|
100
111
|
"anyio",
|
|
101
112
|
"coverage>=7.6.1",
|
|
102
113
|
"pytest>=8.0.0",
|
|
@@ -113,7 +124,7 @@ sqlspec = "sqlspec.__main__:run_cli"
|
|
|
113
124
|
|
|
114
125
|
[build-system]
|
|
115
126
|
build-backend = "hatchling.build"
|
|
116
|
-
requires = ["hatchling"]
|
|
127
|
+
requires = ["hatchling", "hatch-mypyc"]
|
|
117
128
|
|
|
118
129
|
[tool.hatch.build.targets.sdist]
|
|
119
130
|
dev-mode-dirs = ["."]
|
|
@@ -127,11 +138,57 @@ include = ["NOTICE"]
|
|
|
127
138
|
packages = ["sqlspec"]
|
|
128
139
|
|
|
129
140
|
|
|
141
|
+
[tool.hatch.build.targets.wheel.hooks.mypyc]
|
|
142
|
+
dependencies = ["hatch-mypyc", "hatch-cython"]
|
|
143
|
+
enable-by-default = false
|
|
144
|
+
exclude = [
|
|
145
|
+
"tests/**", # Test files
|
|
146
|
+
"sqlspec/__main__.py", # Entry point (can't run directly when compiled)
|
|
147
|
+
"sqlspec/cli.py", # CLI module (not performance critical)
|
|
148
|
+
"sqlspec/typing.py", # Type aliases
|
|
149
|
+
"sqlspec/_typing.py", # Type aliases
|
|
150
|
+
"sqlspec/config.py", # Main config
|
|
151
|
+
"sqlspec/adapters/**/config.py", # Adapter configurations
|
|
152
|
+
"sqlspec/adapters/**/_types.py", # Type definitions (mypyc incompatible)
|
|
153
|
+
"sqlspec/extensions/**", # All extensions
|
|
154
|
+
"sqlspec/**/__init__.py", # Init files (usually just imports)
|
|
155
|
+
"sqlspec/protocols.py", # Protocol definitions
|
|
156
|
+
"sqlspec/builder/**/*.py", # Builder (not performance critical)
|
|
157
|
+
|
|
158
|
+
]
|
|
159
|
+
include = [
|
|
160
|
+
"sqlspec/core/**/*.py", # Core module
|
|
161
|
+
"sqlspec/loader.py", # Loader module
|
|
162
|
+
|
|
163
|
+
# === UTILITY MODULES ===
|
|
164
|
+
"sqlspec/utils/text.py", # Text utilities
|
|
165
|
+
"sqlspec/utils/sync_tools.py", # Synchronous utility functions
|
|
166
|
+
"sqlspec/utils/type_guards.py", # Type guard utilities
|
|
167
|
+
"sqlspec/utils/fixtures.py", # File fixture loading
|
|
168
|
+
]
|
|
169
|
+
mypy-args = [
|
|
170
|
+
"--ignore-missing-imports",
|
|
171
|
+
"--allow-untyped-defs",
|
|
172
|
+
"--allow-untyped-globals",
|
|
173
|
+
"--no-implicit-reexport",
|
|
174
|
+
"--no-warn-redundant-casts",
|
|
175
|
+
"--no-warn-unused-ignores",
|
|
176
|
+
"--follow-imports=skip",
|
|
177
|
+
]
|
|
178
|
+
require-runtime-dependencies = true
|
|
179
|
+
require-runtime-features = ["mypyc"]
|
|
180
|
+
|
|
181
|
+
[tool.hatch.build.targets.wheel.hooks.mypyc.options]
|
|
182
|
+
debug_level = "0" # No debug info in production (0-2)
|
|
183
|
+
multi_file = true # Enable cross-module optimization
|
|
184
|
+
opt_level = "3" # Maximum optimization (0-3)
|
|
185
|
+
|
|
186
|
+
|
|
130
187
|
[tool.bumpversion]
|
|
131
188
|
allow_dirty = true
|
|
132
189
|
commit = false
|
|
133
190
|
commit_args = "--no-verify"
|
|
134
|
-
current_version = "0.
|
|
191
|
+
current_version = "0.15.0"
|
|
135
192
|
ignore_missing_files = false
|
|
136
193
|
ignore_missing_version = false
|
|
137
194
|
message = "chore(release): bump to v{new_version}"
|
|
@@ -281,6 +338,8 @@ module = [
|
|
|
281
338
|
"fsspec.*",
|
|
282
339
|
"sqlglot",
|
|
283
340
|
"sqlglot.*",
|
|
341
|
+
"pgvector",
|
|
342
|
+
"pgvector.*",
|
|
284
343
|
]
|
|
285
344
|
|
|
286
345
|
[[tool.mypy.overrides]]
|
|
@@ -302,7 +361,8 @@ reportPrivateImportUsage = false
|
|
|
302
361
|
reportPrivateUsage = false
|
|
303
362
|
reportTypedDictNotRequiredAccess = false
|
|
304
363
|
reportUnknownArgumentType = false
|
|
305
|
-
|
|
364
|
+
reportUnnecessaryCast = false
|
|
365
|
+
reportUnnecessaryTypeIgnoreComments = false
|
|
306
366
|
root = "."
|
|
307
367
|
venv = ".venv"
|
|
308
368
|
|
|
@@ -376,6 +436,8 @@ ignore = [
|
|
|
376
436
|
"S608", # ruff - Possible sql injection
|
|
377
437
|
"PLR0904", # too many public methods
|
|
378
438
|
"PLR6301", # method could be static or class method
|
|
439
|
+
"B903", # class could be a dataclass or named tuple
|
|
440
|
+
"PLW0603", # Using the global statement to update is discouraged
|
|
379
441
|
]
|
|
380
442
|
select = ["ALL"]
|
|
381
443
|
|
|
@@ -402,7 +464,7 @@ split-on-trailing-comma = false
|
|
|
402
464
|
[tool.ruff.lint.per-file-ignores]
|
|
403
465
|
"docs/**/*.*" = ["S", "B", "DTZ", "A", "TC", "ERA", "D", "RET", "PLW0127"]
|
|
404
466
|
"docs/examples/**" = ["T201"]
|
|
405
|
-
"sqlspec/
|
|
467
|
+
"sqlspec/builder/mixins/**/*.*" = ["SLF001"]
|
|
406
468
|
"tests/**/*.*" = [
|
|
407
469
|
"A",
|
|
408
470
|
"ARG",
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""SQLSpec: Safe and elegant SQL query building for Python."""
|
|
2
|
+
|
|
3
|
+
from sqlspec import adapters, base, builder, core, driver, exceptions, extensions, loader, migrations, typing, utils
|
|
4
|
+
from sqlspec.__metadata__ import __version__
|
|
5
|
+
from sqlspec._sql import SQLFactory, sql
|
|
6
|
+
from sqlspec.base import SQLSpec
|
|
7
|
+
from sqlspec.builder import (
|
|
8
|
+
Column,
|
|
9
|
+
ColumnExpression,
|
|
10
|
+
CreateTable,
|
|
11
|
+
Delete,
|
|
12
|
+
DropTable,
|
|
13
|
+
FunctionColumn,
|
|
14
|
+
Insert,
|
|
15
|
+
Merge,
|
|
16
|
+
QueryBuilder,
|
|
17
|
+
Select,
|
|
18
|
+
Update,
|
|
19
|
+
)
|
|
20
|
+
from sqlspec.config import AsyncDatabaseConfig, SyncDatabaseConfig
|
|
21
|
+
from sqlspec.core import (
|
|
22
|
+
SQL,
|
|
23
|
+
ArrowResult,
|
|
24
|
+
CacheConfig,
|
|
25
|
+
CacheStats,
|
|
26
|
+
ParameterConverter,
|
|
27
|
+
ParameterProcessor,
|
|
28
|
+
ParameterStyle,
|
|
29
|
+
ParameterStyleConfig,
|
|
30
|
+
SQLResult,
|
|
31
|
+
Statement,
|
|
32
|
+
StatementConfig,
|
|
33
|
+
)
|
|
34
|
+
from sqlspec.core import filters as filters
|
|
35
|
+
from sqlspec.driver import AsyncDriverAdapterBase, ExecutionResult, SyncDriverAdapterBase
|
|
36
|
+
from sqlspec.loader import SQLFile, SQLFileLoader
|
|
37
|
+
from sqlspec.typing import ConnectionT, DictRow, ModelDTOT, ModelT, RowT, StatementParameters, SupportedSchemaModel
|
|
38
|
+
|
|
39
|
+
__all__ = (
|
|
40
|
+
"SQL",
|
|
41
|
+
"ArrowResult",
|
|
42
|
+
"AsyncDatabaseConfig",
|
|
43
|
+
"AsyncDriverAdapterBase",
|
|
44
|
+
"CacheConfig",
|
|
45
|
+
"CacheStats",
|
|
46
|
+
"Column",
|
|
47
|
+
"ColumnExpression",
|
|
48
|
+
"ConnectionT",
|
|
49
|
+
"CreateTable",
|
|
50
|
+
"Delete",
|
|
51
|
+
"DictRow",
|
|
52
|
+
"DropTable",
|
|
53
|
+
"ExecutionResult",
|
|
54
|
+
"FunctionColumn",
|
|
55
|
+
"Insert",
|
|
56
|
+
"Merge",
|
|
57
|
+
"ModelDTOT",
|
|
58
|
+
"ModelT",
|
|
59
|
+
"ParameterConverter",
|
|
60
|
+
"ParameterProcessor",
|
|
61
|
+
"ParameterStyle",
|
|
62
|
+
"ParameterStyleConfig",
|
|
63
|
+
"QueryBuilder",
|
|
64
|
+
"RowT",
|
|
65
|
+
"SQLFactory",
|
|
66
|
+
"SQLFile",
|
|
67
|
+
"SQLFileLoader",
|
|
68
|
+
"SQLResult",
|
|
69
|
+
"SQLSpec",
|
|
70
|
+
"Select",
|
|
71
|
+
"Statement",
|
|
72
|
+
"StatementConfig",
|
|
73
|
+
"StatementParameters",
|
|
74
|
+
"SupportedSchemaModel",
|
|
75
|
+
"SyncDatabaseConfig",
|
|
76
|
+
"SyncDriverAdapterBase",
|
|
77
|
+
"Update",
|
|
78
|
+
"__version__",
|
|
79
|
+
"adapters",
|
|
80
|
+
"base",
|
|
81
|
+
"builder",
|
|
82
|
+
"core",
|
|
83
|
+
"driver",
|
|
84
|
+
"exceptions",
|
|
85
|
+
"extensions",
|
|
86
|
+
"filters",
|
|
87
|
+
"loader",
|
|
88
|
+
"migrations",
|
|
89
|
+
"sql",
|
|
90
|
+
"typing",
|
|
91
|
+
"utils",
|
|
92
|
+
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Metadata for the
|
|
1
|
+
"""Metadata for the project."""
|
|
2
2
|
|
|
3
3
|
from importlib.metadata import PackageNotFoundError, metadata, version
|
|
4
4
|
|
|
@@ -6,9 +6,7 @@ __all__ = ("__project__", "__version__")
|
|
|
6
6
|
|
|
7
7
|
try:
|
|
8
8
|
__version__ = version("sqlspec")
|
|
9
|
-
"""Version of the project."""
|
|
10
9
|
__project__ = metadata("sqlspec")["Name"]
|
|
11
|
-
"""Name of the project."""
|
|
12
10
|
except PackageNotFoundError: # pragma: no cover
|
|
13
11
|
__version__ = "0.0.1"
|
|
14
12
|
__project__ = "SQLSpec"
|
|
@@ -15,10 +15,9 @@ def _type_to_string(value: Any) -> str: # pragma: no cover
|
|
|
15
15
|
if PYDANTIC_INSTALLED and isinstance(value, BaseModel):
|
|
16
16
|
return value.model_dump_json()
|
|
17
17
|
try:
|
|
18
|
-
|
|
18
|
+
return str(value)
|
|
19
19
|
except Exception as exc:
|
|
20
20
|
raise TypeError from exc
|
|
21
|
-
return val
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
try:
|