sqlspec 0.13.1__tar.gz → 0.14.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.13.1 → sqlspec-0.14.0}/.gitignore +4 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/PKG-INFO +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/pyproject.toml +7 -2
- sqlspec-0.14.0/sqlspec/__init__.py +67 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/adbc/config.py +4 -40
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/adbc/driver.py +29 -16
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/aiosqlite/config.py +2 -20
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/aiosqlite/driver.py +36 -18
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncmy/config.py +2 -33
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncmy/driver.py +23 -16
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncpg/config.py +5 -39
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncpg/driver.py +41 -18
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/bigquery/config.py +2 -43
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/bigquery/driver.py +26 -14
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/duckdb/config.py +2 -49
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/duckdb/driver.py +35 -16
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/oracledb/config.py +4 -83
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/oracledb/driver.py +54 -27
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psqlpy/config.py +2 -55
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psqlpy/driver.py +28 -8
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psycopg/config.py +4 -73
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psycopg/driver.py +69 -24
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/sqlite/config.py +3 -21
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/sqlite/driver.py +50 -26
- sqlspec-0.14.0/sqlspec/cli.py +248 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/config.py +18 -20
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/_async.py +28 -10
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/_common.py +5 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/_sync.py +28 -10
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/__init__.py +6 -0
- sqlspec-0.14.0/sqlspec/driver/mixins/_cache.py +114 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_pipeline.py +0 -4
- sqlspec-0.13.1/sqlspec/service/base.py → sqlspec-0.14.0/sqlspec/driver/mixins/_query_tools.py +86 -421
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_result_utils.py +0 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_sql_translator.py +0 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_storage.py +4 -18
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_type_coercion.py +0 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/parameters.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/aiosql/adapter.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/__init__.py +2 -1
- sqlspec-0.14.0/sqlspec/extensions/litestar/cli.py +48 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/plugin.py +3 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/loader.py +1 -1
- sqlspec-0.14.0/sqlspec/migrations/__init__.py +23 -0
- sqlspec-0.14.0/sqlspec/migrations/base.py +390 -0
- sqlspec-0.14.0/sqlspec/migrations/commands.py +525 -0
- sqlspec-0.14.0/sqlspec/migrations/runner.py +215 -0
- sqlspec-0.14.0/sqlspec/migrations/tracker.py +153 -0
- sqlspec-0.14.0/sqlspec/migrations/utils.py +89 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/protocols.py +37 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/builder/__init__.py +8 -8
- sqlspec-0.13.1/sqlspec/statement/builder/column.py → sqlspec-0.14.0/sqlspec/statement/builder/_column.py +82 -52
- sqlspec-0.13.1/sqlspec/statement/builder/ddl.py → sqlspec-0.14.0/sqlspec/statement/builder/_ddl.py +5 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/builder/_ddl_utils.py +1 -1
- sqlspec-0.13.1/sqlspec/statement/builder/delete.py → sqlspec-0.14.0/sqlspec/statement/builder/_delete.py +1 -1
- sqlspec-0.13.1/sqlspec/statement/builder/insert.py → sqlspec-0.14.0/sqlspec/statement/builder/_insert.py +1 -1
- sqlspec-0.13.1/sqlspec/statement/builder/merge.py → sqlspec-0.14.0/sqlspec/statement/builder/_merge.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/builder/_parsing_utils.py +5 -3
- sqlspec-0.13.1/sqlspec/statement/builder/select.py → sqlspec-0.14.0/sqlspec/statement/builder/_select.py +59 -61
- sqlspec-0.13.1/sqlspec/statement/builder/update.py → sqlspec-0.14.0/sqlspec/statement/builder/_update.py +2 -2
- sqlspec-0.14.0/sqlspec/statement/builder/mixins/__init__.py +59 -0
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_set_ops.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_cte_and_set_ops.py +86 -2
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_delete_from.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_delete_operations.py +2 -0
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_insert_values.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_insert_operations.py +70 -1
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_merge_clauses.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_merge_operations.py +2 -0
- sqlspec-0.14.0/sqlspec/statement/builder/mixins/_order_limit_operations.py +123 -0
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_pivot.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_pivot_operations.py +71 -2
- sqlspec-0.14.0/sqlspec/statement/builder/mixins/_select_operations.py +612 -0
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_update_set.py → sqlspec-0.14.0/sqlspec/statement/builder/mixins/_update_operations.py +73 -2
- sqlspec-0.14.0/sqlspec/statement/builder/mixins/_where_clause.py +536 -0
- sqlspec-0.14.0/sqlspec/statement/cache.py +50 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/filters.py +37 -8
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/parameters.py +154 -25
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/__init__.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/context.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/transformers/_expression_simplifier.py +3 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/validators/_parameter_style.py +22 -22
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/validators/_performance.py +1 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/sql.py +246 -176
- sqlspec-0.14.0/sqlspec/utils/__init__.py +4 -0
- sqlspec-0.14.0/sqlspec/utils/statement_hashing.py +203 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/type_guards.py +32 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_arrow_functionality.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_data_types.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_driver.py +7 -7
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_duckdb_driver.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_execute_many.py +3 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_execute_script.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_parameter_styles.py +6 -6
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_postgres_driver.py +11 -13
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_returning.py +3 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_sqlite_driver.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_aiosqlite/test_driver.py +11 -14
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncmy/test_config.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/test_arrow_functionality.py +14 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/test_driver.py +13 -13
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/test_execute_many.py +3 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/test_parameter_styles.py +13 -15
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_bigquery/test_arrow_functionality.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_bigquery/test_driver.py +7 -7
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_arrow_functionality.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_connection.py +6 -6
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_driver.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_execute_many.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_mixed_parameter_styles.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/test_parameter_styles.py +17 -18
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_oracledb/test_driver_async.py +9 -9
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_oracledb/test_driver_sync.py +4 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psqlpy/test_arrow_functionality.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psqlpy/test_driver.py +25 -25
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/test_driver.py +7 -7
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/test_execute_many.py +5 -40
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/test_parameter_styles.py +13 -15
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_sqlite/test_driver.py +10 -10
- sqlspec-0.14.0/tests/integration/test_adapters/test_sqlite/test_query_mixin.py +223 -0
- sqlspec-0.14.0/tests/integration/test_driver_mixins/__init__.py +1 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_sql_file_loader.py +8 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_storage/test_driver_storage_integration.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_storage/test_end_to_end_workflows.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_storage/test_storage_mixins.py +1 -1
- sqlspec-0.14.0/tests/unit/statement/test_cache.py +231 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_adbc/test_config.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_adbc/test_driver.py +5 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_aiosqlite/test_config.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_aiosqlite/test_driver.py +5 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_asyncmy/test_driver.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_asyncpg/test_config.py +4 -44
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_asyncpg/test_driver.py +11 -11
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_bigquery/test_config.py +4 -49
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_bigquery/test_driver.py +1 -3
- sqlspec-0.14.0/tests/unit/test_adapters/test_cache_mixin.py +203 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_duckdb/test_config.py +4 -54
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_duckdb/test_driver.py +4 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_oracledb/test_config.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_oracledb/test_driver.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psqlpy/test_config.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psqlpy/test_driver.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psycopg/test_config.py +7 -7
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psycopg/test_driver.py +6 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_sqlite/test_config.py +6 -28
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_sqlite/test_driver.py +16 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_config.py +6 -6
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_driver.py +8 -8
- sqlspec-0.14.0/tests/unit/test_driver_mixins/__init__.py +1 -0
- sqlspec-0.14.0/tests/unit/test_driver_mixins/test_query_mixin.py +336 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_loader.py +1 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_base.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_base.py +5 -5
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_builder_mixins.py +22 -25
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_column.py +6 -6
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_delete.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_dynamic_columns.py +16 -16
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_insert.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_merge.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_select.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/test_update.py +1 -1
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_config.py +2 -2
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_oracle_numeric_parameters.py +10 -16
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_parameter_normalization.py +23 -23
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_parameter_preservation.py +3 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_expression_simplifier.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_literal_parameterizer_duplication.py +4 -4
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_validators_parameter_style.py +11 -11
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_sql.py +6 -9
- sqlspec-0.14.0/tests/unit/test_statement/test_typed_parameter.py +226 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_singleton.py +1 -1
- sqlspec-0.14.0/tests/unit/utils/test_ast_hashing.py +145 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/uv.lock +215 -57
- sqlspec-0.13.1/sqlspec/__init__.py +0 -29
- sqlspec-0.13.1/sqlspec/service/__init__.py +0 -4
- sqlspec-0.13.1/sqlspec/service/_util.py +0 -147
- sqlspec-0.13.1/sqlspec/service/pagination.py +0 -26
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/__init__.py +0 -65
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_aggregate_functions.py +0 -250
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_case_builder.py +0 -91
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_common_table_expr.py +0 -90
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_from.py +0 -63
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_group_by.py +0 -118
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_having.py +0 -35
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_insert_from_select.py +0 -47
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_insert_into.py +0 -36
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_limit_offset.py +0 -53
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_order_by.py +0 -46
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_returning.py +0 -37
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_select_columns.py +0 -61
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_unpivot.py +0 -77
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_update_from.py +0 -55
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_update_table.py +0 -29
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_where.py +0 -401
- sqlspec-0.13.1/sqlspec/statement/builder/mixins/_window_functions.py +0 -86
- sqlspec-0.13.1/sqlspec/statement/parameter_manager.py +0 -220
- sqlspec-0.13.1/sqlspec/statement/sql_compiler.py +0 -140
- sqlspec-0.13.1/sqlspec/utils/__init__.py +0 -3
- {sqlspec-0.13.1 → sqlspec-0.14.0}/.pre-commit-config.yaml +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/CONTRIBUTING.rst +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/LICENSE +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/Makefile +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/NOTICE +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/README.md +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/__metadata__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/_serialization.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/_sql.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/_typing.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/adbc/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/aiosqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncmy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/asyncpg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/bigquery/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/duckdb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/oracledb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psqlpy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/psycopg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/adapters/sqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/base.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/driver/mixins/_csv_writer.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/exceptions.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/aiosql/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/_utils.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/config.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/handlers.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/extensions/litestar/providers.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/py.typed +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/__init__.py +0 -0
- /sqlspec-0.13.1/sqlspec/statement/builder/base.py → /sqlspec-0.14.0/sqlspec/statement/builder/_base.py +0 -0
- /sqlspec-0.13.1/sqlspec/statement/builder/mixins/_join.py → /sqlspec-0.14.0/sqlspec/statement/builder/mixins/_join_operations.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/analyzers/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/analyzers/_analyzer.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/transformers/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/transformers/_literal_parameterizer.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/transformers/_remove_comments_and_hints.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/validators/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/validators/_dml_safety.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/pipelines/validators/_security.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/result.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/statement/splitter.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/backends/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/backends/base.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/backends/fsspec.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/backends/obstore.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/capabilities.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/storage/registry.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/typing.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/cached_property.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/correlation.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/deprecation.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/fixtures.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/logging.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/module_loader.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/serializers.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/singleton.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/sync_tools.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/sqlspec/utils/text.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/conftest.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/ddls-mysql-collection.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/ddls-postgres-collection.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/example_usage.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/init.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-config.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-data_types.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-database_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-engines.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-hostname.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-plugins.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-process_list.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-resource-groups.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-schema_objects.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-table_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/collection-users.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/mysql/init.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/oracle.ddl.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-applications.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-aws_extension_dependency.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-aws_oracle_exists.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-bg_writer_stats.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-calculated_metrics.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-data_types.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-database_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-extensions.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-index_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-pglogical-details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-privileges.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-replication_slots.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-replication_stats.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-schema_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-schema_objects.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-settings.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-source_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/collection-table_details.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/extended-collection-all-databases.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/postgres/init.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/readiness-check.sql +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/fixtures/sql_utils.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/conftest.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_bigquery_driver.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_adbc/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_aiosqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncmy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/conftest.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_asyncpg/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_bigquery/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_bigquery/conftest.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_bigquery/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_duckdb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_oracledb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_oracledb/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psqlpy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psqlpy/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/conftest.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/test_async_copy.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_psycopg/test_connection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_adapters/test_sqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_dialect_propagation.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_extensions/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_extensions/test_aiosql/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_extensions/test_litestar/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/integration/test_storage/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_adbc/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_aiosqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_asyncmy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_asyncpg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_bigquery/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_duckdb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_oracledb/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psqlpy/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_psycopg/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_adapters/test_sqlite/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_base.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_config_dialect.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_exceptions.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_extensions/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_extensions/test_aiosql/test_adapter.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_builder/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_filters.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_mixins.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_parameters.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_analyzer.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_analyzer_subquery_detection.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_transformers_literal_parameterizer.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_transformers_literal_parameterizer_cte.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_transformers_remove_comments.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_validators_dml_safety.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_validators_performance.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_pipelines/test_validators_security.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_result.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_splitter.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_sql_as_many.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_sql_translator_mixin.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_sqlfactory.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_storage.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_statement/test_transformers/test_expression_simplifier_parameter_tracking.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/test_backends/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/test_backends/test_fsspec_backend.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/test_backends/test_obstore_backend.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/test_base.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_storage/test_registry.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_typing.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_deprecation.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_fixtures.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_module_loader.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_sync_tools.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tests/unit/test_utils/test_text.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/build_docs.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/pypi_readme.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/sphinx_ext/__init__.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/sphinx_ext/changelog.py +0 -0
- {sqlspec-0.13.1 → sqlspec-0.14.0}/tools/sphinx_ext/missing_references.py +0 -0
|
@@ -7,7 +7,7 @@ maintainers = [{ name = "Litestar Developers", email = "hello@litestar.dev" }]
|
|
|
7
7
|
name = "sqlspec"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
requires-python = ">=3.9, <4.0"
|
|
10
|
-
version = "0.
|
|
10
|
+
version = "0.14.0"
|
|
11
11
|
|
|
12
12
|
[project.urls]
|
|
13
13
|
Discord = "https://discord.gg/litestar"
|
|
@@ -48,6 +48,7 @@ uuid = ["uuid-utils"]
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
[dependency-groups]
|
|
51
|
+
benchmarks = ["sqlalchemy", "psutil", "types-psutil"]
|
|
51
52
|
build = ["bump-my-version"]
|
|
52
53
|
dev = [
|
|
53
54
|
{ include-group = "extras" },
|
|
@@ -55,6 +56,7 @@ dev = [
|
|
|
55
56
|
{ include-group = "doc" },
|
|
56
57
|
{ include-group = "test" },
|
|
57
58
|
{ include-group = "build" },
|
|
59
|
+
{ include-group = "benchmarks" },
|
|
58
60
|
]
|
|
59
61
|
doc = [
|
|
60
62
|
"auto-pytabs[sphinx]>=0.5.0",
|
|
@@ -106,6 +108,9 @@ test = [
|
|
|
106
108
|
"pytest-xdist>=3.6.1",
|
|
107
109
|
]
|
|
108
110
|
|
|
111
|
+
[project.scripts]
|
|
112
|
+
sqlspec = "sqlspec.cli:run_cli"
|
|
113
|
+
|
|
109
114
|
[build-system]
|
|
110
115
|
build-backend = "hatchling.build"
|
|
111
116
|
requires = ["hatchling"]
|
|
@@ -126,7 +131,7 @@ packages = ["sqlspec"]
|
|
|
126
131
|
allow_dirty = true
|
|
127
132
|
commit = false
|
|
128
133
|
commit_args = "--no-verify"
|
|
129
|
-
current_version = "0.
|
|
134
|
+
current_version = "0.14.0"
|
|
130
135
|
ignore_missing_files = false
|
|
131
136
|
ignore_missing_version = false
|
|
132
137
|
message = "chore(release): bump to v{new_version}"
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""SQLSpec: Safe and elegant SQL query building for Python."""
|
|
2
|
+
|
|
3
|
+
from sqlspec import adapters, base, driver, exceptions, extensions, loader, statement, typing, utils
|
|
4
|
+
from sqlspec.__metadata__ import __version__
|
|
5
|
+
from sqlspec._sql import SQLFactory
|
|
6
|
+
from sqlspec.base import SQLSpec
|
|
7
|
+
from sqlspec.config import AsyncDatabaseConfig, SyncDatabaseConfig
|
|
8
|
+
from sqlspec.exceptions import (
|
|
9
|
+
NotFoundError,
|
|
10
|
+
ParameterError,
|
|
11
|
+
SQLBuilderError,
|
|
12
|
+
SQLFileNotFoundError,
|
|
13
|
+
SQLFileParseError,
|
|
14
|
+
SQLParsingError,
|
|
15
|
+
SQLValidationError,
|
|
16
|
+
)
|
|
17
|
+
from sqlspec.loader import SQLFile, SQLFileLoader
|
|
18
|
+
from sqlspec.statement.builder import Column, ColumnExpression, Delete, FunctionColumn, Insert, Merge, Select, Update
|
|
19
|
+
from sqlspec.statement.result import ArrowResult, SQLResult
|
|
20
|
+
from sqlspec.statement.sql import SQL, SQLConfig
|
|
21
|
+
from sqlspec.typing import ConnectionT, DictRow, ModelDTOT, ModelT, RowT, StatementParameters
|
|
22
|
+
|
|
23
|
+
sql = SQLFactory()
|
|
24
|
+
|
|
25
|
+
__all__ = (
|
|
26
|
+
"SQL",
|
|
27
|
+
"ArrowResult",
|
|
28
|
+
"AsyncDatabaseConfig",
|
|
29
|
+
"Column",
|
|
30
|
+
"ColumnExpression",
|
|
31
|
+
"ConnectionT",
|
|
32
|
+
"Delete",
|
|
33
|
+
"DictRow",
|
|
34
|
+
"FunctionColumn",
|
|
35
|
+
"Insert",
|
|
36
|
+
"Merge",
|
|
37
|
+
"ModelDTOT",
|
|
38
|
+
"ModelT",
|
|
39
|
+
"NotFoundError",
|
|
40
|
+
"ParameterError",
|
|
41
|
+
"RowT",
|
|
42
|
+
"SQLBuilderError",
|
|
43
|
+
"SQLConfig",
|
|
44
|
+
"SQLFile",
|
|
45
|
+
"SQLFileLoader",
|
|
46
|
+
"SQLFileNotFoundError",
|
|
47
|
+
"SQLFileParseError",
|
|
48
|
+
"SQLParsingError",
|
|
49
|
+
"SQLResult",
|
|
50
|
+
"SQLSpec",
|
|
51
|
+
"SQLValidationError",
|
|
52
|
+
"Select",
|
|
53
|
+
"StatementParameters",
|
|
54
|
+
"SyncDatabaseConfig",
|
|
55
|
+
"Update",
|
|
56
|
+
"__version__",
|
|
57
|
+
"adapters",
|
|
58
|
+
"base",
|
|
59
|
+
"driver",
|
|
60
|
+
"exceptions",
|
|
61
|
+
"extensions",
|
|
62
|
+
"loader",
|
|
63
|
+
"sql",
|
|
64
|
+
"statement",
|
|
65
|
+
"typing",
|
|
66
|
+
"utils",
|
|
67
|
+
)
|
|
@@ -69,41 +69,6 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
69
69
|
- Cloud database integrations
|
|
70
70
|
"""
|
|
71
71
|
|
|
72
|
-
__slots__ = (
|
|
73
|
-
"_dialect",
|
|
74
|
-
"account",
|
|
75
|
-
"adbc_driver_manager_entrypoint",
|
|
76
|
-
"authorization_header",
|
|
77
|
-
"autocommit",
|
|
78
|
-
"batch_size",
|
|
79
|
-
"conn_kwargs",
|
|
80
|
-
"connection_timeout",
|
|
81
|
-
"database",
|
|
82
|
-
"dataset_id",
|
|
83
|
-
"db_kwargs",
|
|
84
|
-
"default_row_type",
|
|
85
|
-
"driver_name",
|
|
86
|
-
"extras",
|
|
87
|
-
"grpc_options",
|
|
88
|
-
"isolation_level",
|
|
89
|
-
"on_connection_create",
|
|
90
|
-
"password",
|
|
91
|
-
"pool_instance",
|
|
92
|
-
"project_id",
|
|
93
|
-
"query_timeout",
|
|
94
|
-
"role",
|
|
95
|
-
"schema",
|
|
96
|
-
"ssl_ca",
|
|
97
|
-
"ssl_cert",
|
|
98
|
-
"ssl_key",
|
|
99
|
-
"ssl_mode",
|
|
100
|
-
"statement_config",
|
|
101
|
-
"token",
|
|
102
|
-
"uri",
|
|
103
|
-
"username",
|
|
104
|
-
"warehouse",
|
|
105
|
-
)
|
|
106
|
-
|
|
107
72
|
is_async: ClassVar[bool] = False
|
|
108
73
|
supports_connection_pooling: ClassVar[bool] = False
|
|
109
74
|
driver_type: type[AdbcDriver] = AdbcDriver
|
|
@@ -114,7 +79,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
114
79
|
supported_parameter_styles: ClassVar[tuple[str, ...]] = ("qmark",)
|
|
115
80
|
"""ADBC parameter styles depend on the underlying driver."""
|
|
116
81
|
|
|
117
|
-
|
|
82
|
+
default_parameter_style: ClassVar[str] = "qmark"
|
|
118
83
|
"""ADBC default parameter style is ? (qmark)."""
|
|
119
84
|
|
|
120
85
|
def __init__(
|
|
@@ -251,7 +216,6 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
251
216
|
self.statement_config = statement_config or SQLConfig()
|
|
252
217
|
self.default_row_type = default_row_type
|
|
253
218
|
self.on_connection_create = on_connection_create
|
|
254
|
-
self._dialect: DialectType = None
|
|
255
219
|
super().__init__()
|
|
256
220
|
|
|
257
221
|
def _resolve_driver_name(self) -> str:
|
|
@@ -381,7 +345,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
381
345
|
"""Get parameter styles based on the underlying driver.
|
|
382
346
|
|
|
383
347
|
Returns:
|
|
384
|
-
Tuple of (supported_parameter_styles,
|
|
348
|
+
Tuple of (supported_parameter_styles, default_parameter_style)
|
|
385
349
|
"""
|
|
386
350
|
try:
|
|
387
351
|
driver_path = self._resolve_driver_name()
|
|
@@ -400,7 +364,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
400
364
|
|
|
401
365
|
except Exception:
|
|
402
366
|
# If we can't determine driver, use defaults
|
|
403
|
-
return (self.supported_parameter_styles, self.
|
|
367
|
+
return (self.supported_parameter_styles, self.default_parameter_style)
|
|
404
368
|
return (("qmark",), "qmark")
|
|
405
369
|
|
|
406
370
|
def create_connection(self) -> AdbcConnection:
|
|
@@ -467,7 +431,7 @@ class AdbcConfig(NoPoolSyncConfig[AdbcConnection, AdbcDriver]):
|
|
|
467
431
|
statement_config = replace(
|
|
468
432
|
statement_config,
|
|
469
433
|
allowed_parameter_styles=supported_styles,
|
|
470
|
-
|
|
434
|
+
default_parameter_style=preferred_style,
|
|
471
435
|
)
|
|
472
436
|
|
|
473
437
|
driver = self.driver_type(connection=connection, config=statement_config)
|
|
@@ -12,12 +12,13 @@ from sqlspec.driver import SyncDriverAdapterProtocol
|
|
|
12
12
|
from sqlspec.driver.connection import managed_transaction_sync
|
|
13
13
|
from sqlspec.driver.mixins import (
|
|
14
14
|
SQLTranslatorMixin,
|
|
15
|
+
SyncAdapterCacheMixin,
|
|
15
16
|
SyncPipelinedExecutionMixin,
|
|
16
17
|
SyncStorageMixin,
|
|
17
18
|
ToSchemaMixin,
|
|
18
19
|
TypeCoercionMixin,
|
|
19
20
|
)
|
|
20
|
-
from sqlspec.driver.parameters import
|
|
21
|
+
from sqlspec.driver.parameters import convert_parameter_sequence
|
|
21
22
|
from sqlspec.exceptions import wrap_exceptions
|
|
22
23
|
from sqlspec.statement.parameters import ParameterStyle
|
|
23
24
|
from sqlspec.statement.result import ArrowResult, SQLResult
|
|
@@ -37,6 +38,7 @@ AdbcConnection = Connection
|
|
|
37
38
|
|
|
38
39
|
class AdbcDriver(
|
|
39
40
|
SyncDriverAdapterProtocol["AdbcConnection", RowT],
|
|
41
|
+
SyncAdapterCacheMixin,
|
|
40
42
|
SQLTranslatorMixin,
|
|
41
43
|
TypeCoercionMixin,
|
|
42
44
|
SyncStorageMixin,
|
|
@@ -60,7 +62,6 @@ class AdbcDriver(
|
|
|
60
62
|
supports_native_arrow_export: ClassVar[bool] = True
|
|
61
63
|
supports_native_parquet_export: ClassVar[bool] = False # Not implemented yet
|
|
62
64
|
supports_native_parquet_import: ClassVar[bool] = True
|
|
63
|
-
__slots__ = ("default_parameter_style", "dialect", "supported_parameter_styles")
|
|
64
65
|
|
|
65
66
|
def __init__(
|
|
66
67
|
self,
|
|
@@ -181,7 +182,7 @@ class AdbcDriver(
|
|
|
181
182
|
self, statement: SQL, connection: Optional["AdbcConnection"] = None, **kwargs: Any
|
|
182
183
|
) -> SQLResult[RowT]:
|
|
183
184
|
if statement.is_script:
|
|
184
|
-
sql, _ =
|
|
185
|
+
sql, _ = self._get_compiled_sql(statement, ParameterStyle.STATIC)
|
|
185
186
|
return self._execute_script(sql, connection=connection, **kwargs)
|
|
186
187
|
|
|
187
188
|
detected_styles = {p.style for p in statement.parameter_info}
|
|
@@ -197,7 +198,7 @@ class AdbcDriver(
|
|
|
197
198
|
target_style = style
|
|
198
199
|
break
|
|
199
200
|
|
|
200
|
-
sql, params =
|
|
201
|
+
sql, params = self._get_compiled_sql(statement, target_style)
|
|
201
202
|
params = self._process_parameters(params)
|
|
202
203
|
if statement.is_many:
|
|
203
204
|
return self._execute_many(sql, params, connection=connection, **kwargs)
|
|
@@ -211,17 +212,18 @@ class AdbcDriver(
|
|
|
211
212
|
conn = connection if connection is not None else self._connection(None)
|
|
212
213
|
|
|
213
214
|
with managed_transaction_sync(conn, auto_commit=True) as txn_conn:
|
|
214
|
-
|
|
215
|
-
if
|
|
216
|
-
cursor_params = [
|
|
215
|
+
converted_params = convert_parameter_sequence(parameters)
|
|
216
|
+
if converted_params is not None and not isinstance(converted_params, (list, tuple)):
|
|
217
|
+
cursor_params = [converted_params]
|
|
217
218
|
else:
|
|
218
|
-
cursor_params =
|
|
219
|
+
cursor_params = converted_params
|
|
219
220
|
|
|
220
221
|
with self._get_cursor(txn_conn) as cursor:
|
|
221
222
|
try:
|
|
222
223
|
cursor.execute(sql, cursor_params or [])
|
|
223
224
|
except Exception as e:
|
|
224
|
-
# Rollback transaction on error for PostgreSQL to avoid
|
|
225
|
+
# Rollback transaction on error for PostgreSQL to avoid
|
|
226
|
+
# "current transaction is aborted" errors
|
|
225
227
|
if self.dialect == "postgres":
|
|
226
228
|
with contextlib.suppress(Exception):
|
|
227
229
|
cursor.execute("ROLLBACK")
|
|
@@ -261,11 +263,11 @@ class AdbcDriver(
|
|
|
261
263
|
|
|
262
264
|
with managed_transaction_sync(conn, auto_commit=True) as txn_conn:
|
|
263
265
|
# Normalize parameter list using consolidated utility
|
|
264
|
-
|
|
266
|
+
converted_param_list = convert_parameter_sequence(param_list)
|
|
265
267
|
|
|
266
268
|
with self._get_cursor(txn_conn) as cursor:
|
|
267
269
|
try:
|
|
268
|
-
cursor.executemany(sql,
|
|
270
|
+
cursor.executemany(sql, converted_param_list or [])
|
|
269
271
|
except Exception as e:
|
|
270
272
|
if self.dialect == "postgres":
|
|
271
273
|
with contextlib.suppress(Exception):
|
|
@@ -290,18 +292,28 @@ class AdbcDriver(
|
|
|
290
292
|
with managed_transaction_sync(conn, auto_commit=True) as txn_conn:
|
|
291
293
|
# ADBC drivers don't support multiple statements in a single execute
|
|
292
294
|
statements = self._split_script_statements(script)
|
|
295
|
+
suppress_warnings = kwargs.get("_suppress_warnings", False)
|
|
293
296
|
|
|
294
297
|
executed_count = 0
|
|
298
|
+
total_rows = 0
|
|
295
299
|
with self._get_cursor(txn_conn) as cursor:
|
|
296
300
|
for statement in statements:
|
|
297
301
|
if statement.strip():
|
|
298
|
-
|
|
302
|
+
# Validate each statement unless warnings suppressed
|
|
303
|
+
if not suppress_warnings:
|
|
304
|
+
# Run validation through pipeline
|
|
305
|
+
temp_sql = SQL(statement, config=self.config)
|
|
306
|
+
temp_sql._ensure_processed()
|
|
307
|
+
# Validation errors are logged as warnings by default
|
|
308
|
+
|
|
309
|
+
rows = self._execute_single_script_statement(cursor, statement)
|
|
299
310
|
executed_count += 1
|
|
311
|
+
total_rows += rows
|
|
300
312
|
|
|
301
313
|
return SQLResult(
|
|
302
314
|
statement=SQL(script, _dialect=self.dialect).as_script(),
|
|
303
315
|
data=[],
|
|
304
|
-
rows_affected=
|
|
316
|
+
rows_affected=total_rows,
|
|
305
317
|
operation_type="SCRIPT",
|
|
306
318
|
metadata={"status_message": "SCRIPT EXECUTED"},
|
|
307
319
|
total_statements=executed_count,
|
|
@@ -316,18 +328,19 @@ class AdbcDriver(
|
|
|
316
328
|
statement: The SQL statement to execute
|
|
317
329
|
|
|
318
330
|
Returns:
|
|
319
|
-
|
|
331
|
+
Number of rows affected
|
|
320
332
|
"""
|
|
321
333
|
try:
|
|
322
334
|
cursor.execute(statement)
|
|
323
335
|
except Exception as e:
|
|
324
|
-
# Rollback transaction on error for PostgreSQL to avoid
|
|
336
|
+
# Rollback transaction on error for PostgreSQL to avoid
|
|
337
|
+
# "current transaction is aborted" errors
|
|
325
338
|
if self.dialect == "postgres":
|
|
326
339
|
with contextlib.suppress(Exception):
|
|
327
340
|
cursor.execute("ROLLBACK")
|
|
328
341
|
raise e from e
|
|
329
342
|
else:
|
|
330
|
-
return
|
|
343
|
+
return cursor.rowcount or 0
|
|
331
344
|
|
|
332
345
|
def _fetch_arrow_table(self, sql: SQL, connection: "Optional[Any]" = None, **kwargs: Any) -> "ArrowResult":
|
|
333
346
|
"""ADBC native Arrow table fetching.
|
|
@@ -16,8 +16,6 @@ from sqlspec.typing import DictRow, Empty
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from typing import Literal
|
|
18
18
|
|
|
19
|
-
from sqlglot.dialects.dialect import DialectType
|
|
20
|
-
|
|
21
19
|
|
|
22
20
|
__all__ = ("CONNECTION_FIELDS", "AiosqliteConfig")
|
|
23
21
|
|
|
@@ -34,21 +32,6 @@ class AiosqliteConfig(AsyncDatabaseConfig[AiosqliteConnection, None, AiosqliteDr
|
|
|
34
32
|
Note: Aiosqlite doesn't support connection pooling, so pool_instance is always None.
|
|
35
33
|
"""
|
|
36
34
|
|
|
37
|
-
__slots__ = (
|
|
38
|
-
"_dialect",
|
|
39
|
-
"cached_statements",
|
|
40
|
-
"check_same_thread",
|
|
41
|
-
"database",
|
|
42
|
-
"default_row_type",
|
|
43
|
-
"detect_types",
|
|
44
|
-
"extras",
|
|
45
|
-
"isolation_level",
|
|
46
|
-
"pool_instance",
|
|
47
|
-
"statement_config",
|
|
48
|
-
"timeout",
|
|
49
|
-
"uri",
|
|
50
|
-
)
|
|
51
|
-
|
|
52
35
|
is_async: ClassVar[bool] = True
|
|
53
36
|
supports_connection_pooling: ClassVar[bool] = False
|
|
54
37
|
|
|
@@ -59,7 +42,7 @@ class AiosqliteConfig(AsyncDatabaseConfig[AiosqliteConnection, None, AiosqliteDr
|
|
|
59
42
|
supported_parameter_styles: ClassVar[tuple[str, ...]] = ("qmark", "named_colon")
|
|
60
43
|
"""AIOSQLite supports ? (qmark) and :name (named_colon) parameter styles."""
|
|
61
44
|
|
|
62
|
-
|
|
45
|
+
default_parameter_style: ClassVar[str] = "qmark"
|
|
63
46
|
"""AIOSQLite's native parameter style is ? (qmark)."""
|
|
64
47
|
|
|
65
48
|
def __init__(
|
|
@@ -102,7 +85,6 @@ class AiosqliteConfig(AsyncDatabaseConfig[AiosqliteConnection, None, AiosqliteDr
|
|
|
102
85
|
# Store other config
|
|
103
86
|
self.statement_config = statement_config or SQLConfig()
|
|
104
87
|
self.default_row_type = default_row_type
|
|
105
|
-
self._dialect: DialectType = None
|
|
106
88
|
|
|
107
89
|
super().__init__()
|
|
108
90
|
|
|
@@ -179,7 +161,7 @@ class AiosqliteConfig(AsyncDatabaseConfig[AiosqliteConnection, None, AiosqliteDr
|
|
|
179
161
|
statement_config = replace(
|
|
180
162
|
statement_config,
|
|
181
163
|
allowed_parameter_styles=self.supported_parameter_styles,
|
|
182
|
-
|
|
164
|
+
default_parameter_style=self.default_parameter_style,
|
|
183
165
|
)
|
|
184
166
|
yield self.driver_type(connection=connection, config=statement_config)
|
|
185
167
|
|
|
@@ -10,13 +10,14 @@ import aiosqlite
|
|
|
10
10
|
from sqlspec.driver import AsyncDriverAdapterProtocol
|
|
11
11
|
from sqlspec.driver.connection import managed_transaction_async
|
|
12
12
|
from sqlspec.driver.mixins import (
|
|
13
|
+
AsyncAdapterCacheMixin,
|
|
13
14
|
AsyncPipelinedExecutionMixin,
|
|
14
15
|
AsyncStorageMixin,
|
|
15
16
|
SQLTranslatorMixin,
|
|
16
17
|
ToSchemaMixin,
|
|
17
18
|
TypeCoercionMixin,
|
|
18
19
|
)
|
|
19
|
-
from sqlspec.driver.parameters import
|
|
20
|
+
from sqlspec.driver.parameters import convert_parameter_sequence
|
|
20
21
|
from sqlspec.statement.parameters import ParameterStyle, ParameterValidator
|
|
21
22
|
from sqlspec.statement.result import SQLResult
|
|
22
23
|
from sqlspec.statement.sql import SQL, SQLConfig
|
|
@@ -35,6 +36,7 @@ AiosqliteConnection = aiosqlite.Connection
|
|
|
35
36
|
|
|
36
37
|
class AiosqliteDriver(
|
|
37
38
|
AsyncDriverAdapterProtocol[AiosqliteConnection, RowT],
|
|
39
|
+
AsyncAdapterCacheMixin,
|
|
38
40
|
SQLTranslatorMixin,
|
|
39
41
|
TypeCoercionMixin,
|
|
40
42
|
AsyncStorageMixin,
|
|
@@ -46,7 +48,6 @@ class AiosqliteDriver(
|
|
|
46
48
|
dialect: "DialectType" = "sqlite"
|
|
47
49
|
supported_parameter_styles: "tuple[ParameterStyle, ...]" = (ParameterStyle.QMARK, ParameterStyle.NAMED_COLON)
|
|
48
50
|
default_parameter_style: ParameterStyle = ParameterStyle.QMARK
|
|
49
|
-
__slots__ = ()
|
|
50
51
|
|
|
51
52
|
def __init__(
|
|
52
53
|
self,
|
|
@@ -101,7 +102,7 @@ class AiosqliteDriver(
|
|
|
101
102
|
self, statement: SQL, connection: Optional[AiosqliteConnection] = None, **kwargs: Any
|
|
102
103
|
) -> SQLResult[RowT]:
|
|
103
104
|
if statement.is_script:
|
|
104
|
-
sql, _ =
|
|
105
|
+
sql, _ = self._get_compiled_sql(statement, ParameterStyle.STATIC)
|
|
105
106
|
return await self._execute_script(sql, connection=connection, **kwargs)
|
|
106
107
|
|
|
107
108
|
detected_styles = set()
|
|
@@ -124,13 +125,13 @@ class AiosqliteDriver(
|
|
|
124
125
|
break
|
|
125
126
|
|
|
126
127
|
if statement.is_many:
|
|
127
|
-
sql, params =
|
|
128
|
+
sql, params = self._get_compiled_sql(statement, target_style)
|
|
128
129
|
|
|
129
130
|
params = self._process_parameters(params)
|
|
130
131
|
|
|
131
132
|
return await self._execute_many(sql, params, connection=connection, **kwargs)
|
|
132
133
|
|
|
133
|
-
sql, params =
|
|
134
|
+
sql, params = self._get_compiled_sql(statement, target_style)
|
|
134
135
|
|
|
135
136
|
params = self._process_parameters(params)
|
|
136
137
|
|
|
@@ -142,13 +143,10 @@ class AiosqliteDriver(
|
|
|
142
143
|
conn = self._connection(connection)
|
|
143
144
|
|
|
144
145
|
async with managed_transaction_async(conn, auto_commit=True) as txn_conn:
|
|
145
|
-
|
|
146
|
+
converted_params = convert_parameter_sequence(parameters)
|
|
146
147
|
|
|
147
|
-
# Extract the actual parameters from the
|
|
148
|
-
if
|
|
149
|
-
actual_params = normalized_params[0]
|
|
150
|
-
else:
|
|
151
|
-
actual_params = normalized_params
|
|
148
|
+
# Extract the actual parameters from the converted list
|
|
149
|
+
actual_params = converted_params[0] if converted_params and len(converted_params) == 1 else converted_params
|
|
152
150
|
|
|
153
151
|
# AIOSQLite expects tuple or dict - handle parameter conversion
|
|
154
152
|
if ":param_" in sql or (isinstance(actual_params, dict)):
|
|
@@ -193,11 +191,11 @@ class AiosqliteDriver(
|
|
|
193
191
|
|
|
194
192
|
async with managed_transaction_async(conn, auto_commit=True) as txn_conn:
|
|
195
193
|
# Normalize parameter list using consolidated utility
|
|
196
|
-
|
|
194
|
+
converted_param_list = convert_parameter_sequence(param_list)
|
|
197
195
|
|
|
198
196
|
params_list: list[tuple[Any, ...]] = []
|
|
199
|
-
if
|
|
200
|
-
for param_set in
|
|
197
|
+
if converted_param_list and isinstance(converted_param_list, Sequence):
|
|
198
|
+
for param_set in converted_param_list:
|
|
201
199
|
if isinstance(param_set, (list, tuple)):
|
|
202
200
|
params_list.append(tuple(param_set))
|
|
203
201
|
elif param_set is None:
|
|
@@ -220,16 +218,36 @@ class AiosqliteDriver(
|
|
|
220
218
|
conn = connection if connection is not None else self._connection(None)
|
|
221
219
|
|
|
222
220
|
async with managed_transaction_async(conn, auto_commit=True) as txn_conn:
|
|
221
|
+
# Split script into individual statements for validation
|
|
222
|
+
statements = self._split_script_statements(script)
|
|
223
|
+
suppress_warnings = kwargs.get("_suppress_warnings", False)
|
|
224
|
+
|
|
225
|
+
executed_count = 0
|
|
226
|
+
total_rows = 0
|
|
227
|
+
|
|
228
|
+
# Execute each statement individually for better control and validation
|
|
223
229
|
async with self._get_cursor(txn_conn) as cursor:
|
|
224
|
-
|
|
230
|
+
for statement in statements:
|
|
231
|
+
if statement.strip():
|
|
232
|
+
# Validate each statement unless warnings suppressed
|
|
233
|
+
if not suppress_warnings:
|
|
234
|
+
# Run validation through pipeline
|
|
235
|
+
temp_sql = SQL(statement, config=self.config)
|
|
236
|
+
temp_sql._ensure_processed()
|
|
237
|
+
# Validation errors are logged as warnings by default
|
|
238
|
+
|
|
239
|
+
await cursor.execute(statement)
|
|
240
|
+
executed_count += 1
|
|
241
|
+
total_rows += cursor.rowcount or 0
|
|
242
|
+
|
|
225
243
|
return SQLResult(
|
|
226
244
|
statement=SQL(script, _dialect=self.dialect).as_script(),
|
|
227
245
|
data=[],
|
|
228
|
-
rows_affected=
|
|
246
|
+
rows_affected=total_rows,
|
|
229
247
|
operation_type="SCRIPT",
|
|
230
248
|
metadata={"status_message": "SCRIPT EXECUTED"},
|
|
231
|
-
total_statements
|
|
232
|
-
successful_statements
|
|
249
|
+
total_statements=executed_count,
|
|
250
|
+
successful_statements=executed_count,
|
|
233
251
|
)
|
|
234
252
|
|
|
235
253
|
async def _bulk_load_file(self, file_path: Path, table_name: str, format: str, mode: str, **options: Any) -> int:
|
|
@@ -16,7 +16,6 @@ from sqlspec.typing import DictRow, Empty
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from asyncmy.cursors import Cursor, DictCursor
|
|
18
18
|
from asyncmy.pool import Pool
|
|
19
|
-
from sqlglot.dialects.dialect import DialectType
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
__all__ = ("CONNECTION_FIELDS", "POOL_FIELDS", "AsyncmyConfig")
|
|
@@ -50,34 +49,6 @@ POOL_FIELDS = CONNECTION_FIELDS.union({"minsize", "maxsize", "echo", "pool_recyc
|
|
|
50
49
|
class AsyncmyConfig(AsyncDatabaseConfig[AsyncmyConnection, "Pool", AsyncmyDriver]): # pyright: ignore
|
|
51
50
|
"""Configuration for Asyncmy database connections with direct field-based configuration."""
|
|
52
51
|
|
|
53
|
-
__slots__ = (
|
|
54
|
-
"_dialect",
|
|
55
|
-
"autocommit",
|
|
56
|
-
"charset",
|
|
57
|
-
"connect_timeout",
|
|
58
|
-
"cursor_class",
|
|
59
|
-
"database",
|
|
60
|
-
"default_row_type",
|
|
61
|
-
"echo",
|
|
62
|
-
"extras",
|
|
63
|
-
"host",
|
|
64
|
-
"init_command",
|
|
65
|
-
"local_infile",
|
|
66
|
-
"maxsize",
|
|
67
|
-
"minsize",
|
|
68
|
-
"password",
|
|
69
|
-
"pool_instance",
|
|
70
|
-
"pool_recycle",
|
|
71
|
-
"port",
|
|
72
|
-
"read_default_file",
|
|
73
|
-
"read_default_group",
|
|
74
|
-
"sql_mode",
|
|
75
|
-
"ssl",
|
|
76
|
-
"statement_config",
|
|
77
|
-
"unix_socket",
|
|
78
|
-
"user",
|
|
79
|
-
)
|
|
80
|
-
|
|
81
52
|
is_async: ClassVar[bool] = True
|
|
82
53
|
supports_connection_pooling: ClassVar[bool] = True
|
|
83
54
|
driver_type: type[AsyncmyDriver] = AsyncmyDriver
|
|
@@ -87,7 +58,7 @@ class AsyncmyConfig(AsyncDatabaseConfig[AsyncmyConnection, "Pool", AsyncmyDriver
|
|
|
87
58
|
supported_parameter_styles: ClassVar[tuple[str, ...]] = ("pyformat_positional",)
|
|
88
59
|
"""AsyncMy only supports %s (pyformat_positional) parameter style."""
|
|
89
60
|
|
|
90
|
-
|
|
61
|
+
default_parameter_style: ClassVar[str] = "pyformat_positional"
|
|
91
62
|
"""AsyncMy's native parameter style is %s (pyformat_positional)."""
|
|
92
63
|
|
|
93
64
|
def __init__(
|
|
@@ -175,8 +146,6 @@ class AsyncmyConfig(AsyncDatabaseConfig[AsyncmyConnection, "Pool", AsyncmyDriver
|
|
|
175
146
|
# Store other config
|
|
176
147
|
self.statement_config = statement_config or SQLConfig()
|
|
177
148
|
self.default_row_type = default_row_type
|
|
178
|
-
self.pool_instance: Optional[Pool] = pool_instance
|
|
179
|
-
self._dialect: DialectType = None
|
|
180
149
|
|
|
181
150
|
super().__init__() # pyright: ignore
|
|
182
151
|
|
|
@@ -271,7 +240,7 @@ class AsyncmyConfig(AsyncDatabaseConfig[AsyncmyConnection, "Pool", AsyncmyDriver
|
|
|
271
240
|
statement_config = replace(
|
|
272
241
|
statement_config,
|
|
273
242
|
allowed_parameter_styles=self.supported_parameter_styles,
|
|
274
|
-
|
|
243
|
+
default_parameter_style=self.default_parameter_style,
|
|
275
244
|
)
|
|
276
245
|
yield self.driver_type(connection=connection, config=statement_config)
|
|
277
246
|
|