sqlspec 0.36.0__cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ac8f31065839703b4e70__mypyc.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/__init__.py +140 -0
- sqlspec/__main__.py +12 -0
- sqlspec/__metadata__.py +14 -0
- sqlspec/_serialization.py +315 -0
- sqlspec/_typing.py +700 -0
- sqlspec/adapters/__init__.py +0 -0
- sqlspec/adapters/adbc/__init__.py +5 -0
- sqlspec/adapters/adbc/_typing.py +82 -0
- sqlspec/adapters/adbc/adk/__init__.py +5 -0
- sqlspec/adapters/adbc/adk/store.py +1273 -0
- sqlspec/adapters/adbc/config.py +295 -0
- sqlspec/adapters/adbc/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/adbc/core.py +735 -0
- sqlspec/adapters/adbc/data_dictionary.py +334 -0
- sqlspec/adapters/adbc/driver.py +529 -0
- sqlspec/adapters/adbc/events/__init__.py +5 -0
- sqlspec/adapters/adbc/events/store.py +285 -0
- sqlspec/adapters/adbc/litestar/__init__.py +5 -0
- sqlspec/adapters/adbc/litestar/store.py +502 -0
- sqlspec/adapters/adbc/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/adbc/type_converter.py +140 -0
- sqlspec/adapters/aiosqlite/__init__.py +25 -0
- sqlspec/adapters/aiosqlite/_typing.py +82 -0
- sqlspec/adapters/aiosqlite/adk/__init__.py +5 -0
- sqlspec/adapters/aiosqlite/adk/store.py +818 -0
- sqlspec/adapters/aiosqlite/config.py +334 -0
- sqlspec/adapters/aiosqlite/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/aiosqlite/core.py +315 -0
- sqlspec/adapters/aiosqlite/data_dictionary.py +208 -0
- sqlspec/adapters/aiosqlite/driver.py +313 -0
- sqlspec/adapters/aiosqlite/events/__init__.py +5 -0
- sqlspec/adapters/aiosqlite/events/store.py +20 -0
- sqlspec/adapters/aiosqlite/litestar/__init__.py +5 -0
- sqlspec/adapters/aiosqlite/litestar/store.py +279 -0
- sqlspec/adapters/aiosqlite/pool.py +533 -0
- sqlspec/adapters/asyncmy/__init__.py +21 -0
- sqlspec/adapters/asyncmy/_typing.py +87 -0
- sqlspec/adapters/asyncmy/adk/__init__.py +5 -0
- sqlspec/adapters/asyncmy/adk/store.py +703 -0
- sqlspec/adapters/asyncmy/config.py +302 -0
- sqlspec/adapters/asyncmy/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/asyncmy/core.py +360 -0
- sqlspec/adapters/asyncmy/data_dictionary.py +124 -0
- sqlspec/adapters/asyncmy/driver.py +383 -0
- sqlspec/adapters/asyncmy/events/__init__.py +5 -0
- sqlspec/adapters/asyncmy/events/store.py +104 -0
- sqlspec/adapters/asyncmy/litestar/__init__.py +5 -0
- sqlspec/adapters/asyncmy/litestar/store.py +296 -0
- sqlspec/adapters/asyncpg/__init__.py +19 -0
- sqlspec/adapters/asyncpg/_typing.py +88 -0
- sqlspec/adapters/asyncpg/adk/__init__.py +5 -0
- sqlspec/adapters/asyncpg/adk/store.py +748 -0
- sqlspec/adapters/asyncpg/config.py +569 -0
- sqlspec/adapters/asyncpg/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/asyncpg/core.py +367 -0
- sqlspec/adapters/asyncpg/data_dictionary.py +162 -0
- sqlspec/adapters/asyncpg/driver.py +487 -0
- sqlspec/adapters/asyncpg/events/__init__.py +6 -0
- sqlspec/adapters/asyncpg/events/backend.py +286 -0
- sqlspec/adapters/asyncpg/events/store.py +40 -0
- sqlspec/adapters/asyncpg/litestar/__init__.py +5 -0
- sqlspec/adapters/asyncpg/litestar/store.py +251 -0
- sqlspec/adapters/bigquery/__init__.py +14 -0
- sqlspec/adapters/bigquery/_typing.py +86 -0
- sqlspec/adapters/bigquery/adk/__init__.py +5 -0
- sqlspec/adapters/bigquery/adk/store.py +827 -0
- sqlspec/adapters/bigquery/config.py +353 -0
- sqlspec/adapters/bigquery/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/bigquery/core.py +715 -0
- sqlspec/adapters/bigquery/data_dictionary.py +128 -0
- sqlspec/adapters/bigquery/driver.py +548 -0
- sqlspec/adapters/bigquery/events/__init__.py +5 -0
- sqlspec/adapters/bigquery/events/store.py +139 -0
- sqlspec/adapters/bigquery/litestar/__init__.py +5 -0
- sqlspec/adapters/bigquery/litestar/store.py +325 -0
- sqlspec/adapters/bigquery/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/bigquery/type_converter.py +107 -0
- sqlspec/adapters/cockroach_asyncpg/__init__.py +24 -0
- sqlspec/adapters/cockroach_asyncpg/_typing.py +72 -0
- sqlspec/adapters/cockroach_asyncpg/adk/__init__.py +3 -0
- sqlspec/adapters/cockroach_asyncpg/adk/store.py +410 -0
- sqlspec/adapters/cockroach_asyncpg/config.py +238 -0
- sqlspec/adapters/cockroach_asyncpg/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/cockroach_asyncpg/core.py +55 -0
- sqlspec/adapters/cockroach_asyncpg/data_dictionary.py +107 -0
- sqlspec/adapters/cockroach_asyncpg/driver.py +144 -0
- sqlspec/adapters/cockroach_asyncpg/events/__init__.py +3 -0
- sqlspec/adapters/cockroach_asyncpg/events/store.py +20 -0
- sqlspec/adapters/cockroach_asyncpg/litestar/__init__.py +3 -0
- sqlspec/adapters/cockroach_asyncpg/litestar/store.py +142 -0
- sqlspec/adapters/cockroach_psycopg/__init__.py +38 -0
- sqlspec/adapters/cockroach_psycopg/_typing.py +129 -0
- sqlspec/adapters/cockroach_psycopg/adk/__init__.py +13 -0
- sqlspec/adapters/cockroach_psycopg/adk/store.py +868 -0
- sqlspec/adapters/cockroach_psycopg/config.py +484 -0
- sqlspec/adapters/cockroach_psycopg/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/cockroach_psycopg/core.py +63 -0
- sqlspec/adapters/cockroach_psycopg/data_dictionary.py +215 -0
- sqlspec/adapters/cockroach_psycopg/driver.py +284 -0
- sqlspec/adapters/cockroach_psycopg/events/__init__.py +6 -0
- sqlspec/adapters/cockroach_psycopg/events/store.py +34 -0
- sqlspec/adapters/cockroach_psycopg/litestar/__init__.py +3 -0
- sqlspec/adapters/cockroach_psycopg/litestar/store.py +325 -0
- sqlspec/adapters/duckdb/__init__.py +25 -0
- sqlspec/adapters/duckdb/_typing.py +81 -0
- sqlspec/adapters/duckdb/adk/__init__.py +14 -0
- sqlspec/adapters/duckdb/adk/store.py +850 -0
- sqlspec/adapters/duckdb/config.py +463 -0
- sqlspec/adapters/duckdb/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/duckdb/core.py +257 -0
- sqlspec/adapters/duckdb/data_dictionary.py +140 -0
- sqlspec/adapters/duckdb/driver.py +430 -0
- sqlspec/adapters/duckdb/events/__init__.py +5 -0
- sqlspec/adapters/duckdb/events/store.py +57 -0
- sqlspec/adapters/duckdb/litestar/__init__.py +5 -0
- sqlspec/adapters/duckdb/litestar/store.py +330 -0
- sqlspec/adapters/duckdb/pool.py +293 -0
- sqlspec/adapters/duckdb/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/duckdb/type_converter.py +118 -0
- sqlspec/adapters/mock/__init__.py +72 -0
- sqlspec/adapters/mock/_typing.py +147 -0
- sqlspec/adapters/mock/config.py +483 -0
- sqlspec/adapters/mock/core.py +319 -0
- sqlspec/adapters/mock/data_dictionary.py +366 -0
- sqlspec/adapters/mock/driver.py +721 -0
- sqlspec/adapters/mysqlconnector/__init__.py +36 -0
- sqlspec/adapters/mysqlconnector/_typing.py +141 -0
- sqlspec/adapters/mysqlconnector/adk/__init__.py +15 -0
- sqlspec/adapters/mysqlconnector/adk/store.py +1060 -0
- sqlspec/adapters/mysqlconnector/config.py +394 -0
- sqlspec/adapters/mysqlconnector/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/mysqlconnector/core.py +303 -0
- sqlspec/adapters/mysqlconnector/data_dictionary.py +235 -0
- sqlspec/adapters/mysqlconnector/driver.py +483 -0
- sqlspec/adapters/mysqlconnector/events/__init__.py +8 -0
- sqlspec/adapters/mysqlconnector/events/store.py +98 -0
- sqlspec/adapters/mysqlconnector/litestar/__init__.py +5 -0
- sqlspec/adapters/mysqlconnector/litestar/store.py +426 -0
- sqlspec/adapters/oracledb/__init__.py +60 -0
- sqlspec/adapters/oracledb/_numpy_handlers.py +141 -0
- sqlspec/adapters/oracledb/_typing.py +182 -0
- sqlspec/adapters/oracledb/_uuid_handlers.py +166 -0
- sqlspec/adapters/oracledb/adk/__init__.py +10 -0
- sqlspec/adapters/oracledb/adk/store.py +2369 -0
- sqlspec/adapters/oracledb/config.py +550 -0
- sqlspec/adapters/oracledb/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/oracledb/core.py +543 -0
- sqlspec/adapters/oracledb/data_dictionary.py +536 -0
- sqlspec/adapters/oracledb/driver.py +1229 -0
- sqlspec/adapters/oracledb/events/__init__.py +16 -0
- sqlspec/adapters/oracledb/events/backend.py +347 -0
- sqlspec/adapters/oracledb/events/store.py +420 -0
- sqlspec/adapters/oracledb/litestar/__init__.py +5 -0
- sqlspec/adapters/oracledb/litestar/store.py +781 -0
- sqlspec/adapters/oracledb/migrations.py +535 -0
- sqlspec/adapters/oracledb/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/oracledb/type_converter.py +211 -0
- sqlspec/adapters/psqlpy/__init__.py +17 -0
- sqlspec/adapters/psqlpy/_typing.py +79 -0
- sqlspec/adapters/psqlpy/adk/__init__.py +5 -0
- sqlspec/adapters/psqlpy/adk/store.py +766 -0
- sqlspec/adapters/psqlpy/config.py +304 -0
- sqlspec/adapters/psqlpy/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/psqlpy/core.py +480 -0
- sqlspec/adapters/psqlpy/data_dictionary.py +126 -0
- sqlspec/adapters/psqlpy/driver.py +438 -0
- sqlspec/adapters/psqlpy/events/__init__.py +6 -0
- sqlspec/adapters/psqlpy/events/backend.py +310 -0
- sqlspec/adapters/psqlpy/events/store.py +20 -0
- sqlspec/adapters/psqlpy/litestar/__init__.py +5 -0
- sqlspec/adapters/psqlpy/litestar/store.py +270 -0
- sqlspec/adapters/psqlpy/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/psqlpy/type_converter.py +113 -0
- sqlspec/adapters/psycopg/__init__.py +32 -0
- sqlspec/adapters/psycopg/_typing.py +164 -0
- sqlspec/adapters/psycopg/adk/__init__.py +10 -0
- sqlspec/adapters/psycopg/adk/store.py +1387 -0
- sqlspec/adapters/psycopg/config.py +576 -0
- sqlspec/adapters/psycopg/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/psycopg/core.py +450 -0
- sqlspec/adapters/psycopg/data_dictionary.py +289 -0
- sqlspec/adapters/psycopg/driver.py +975 -0
- sqlspec/adapters/psycopg/events/__init__.py +20 -0
- sqlspec/adapters/psycopg/events/backend.py +458 -0
- sqlspec/adapters/psycopg/events/store.py +42 -0
- sqlspec/adapters/psycopg/litestar/__init__.py +5 -0
- sqlspec/adapters/psycopg/litestar/store.py +552 -0
- sqlspec/adapters/psycopg/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/psycopg/type_converter.py +93 -0
- sqlspec/adapters/pymysql/__init__.py +21 -0
- sqlspec/adapters/pymysql/_typing.py +71 -0
- sqlspec/adapters/pymysql/adk/__init__.py +5 -0
- sqlspec/adapters/pymysql/adk/store.py +540 -0
- sqlspec/adapters/pymysql/config.py +195 -0
- sqlspec/adapters/pymysql/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/pymysql/core.py +299 -0
- sqlspec/adapters/pymysql/data_dictionary.py +122 -0
- sqlspec/adapters/pymysql/driver.py +259 -0
- sqlspec/adapters/pymysql/events/__init__.py +5 -0
- sqlspec/adapters/pymysql/events/store.py +50 -0
- sqlspec/adapters/pymysql/litestar/__init__.py +5 -0
- sqlspec/adapters/pymysql/litestar/store.py +232 -0
- sqlspec/adapters/pymysql/pool.py +137 -0
- sqlspec/adapters/spanner/__init__.py +40 -0
- sqlspec/adapters/spanner/_typing.py +86 -0
- sqlspec/adapters/spanner/adk/__init__.py +5 -0
- sqlspec/adapters/spanner/adk/store.py +732 -0
- sqlspec/adapters/spanner/config.py +352 -0
- sqlspec/adapters/spanner/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/spanner/core.py +188 -0
- sqlspec/adapters/spanner/data_dictionary.py +120 -0
- sqlspec/adapters/spanner/dialect/__init__.py +6 -0
- sqlspec/adapters/spanner/dialect/_spangres.py +57 -0
- sqlspec/adapters/spanner/dialect/_spanner.py +130 -0
- sqlspec/adapters/spanner/driver.py +373 -0
- sqlspec/adapters/spanner/events/__init__.py +5 -0
- sqlspec/adapters/spanner/events/store.py +187 -0
- sqlspec/adapters/spanner/litestar/__init__.py +5 -0
- sqlspec/adapters/spanner/litestar/store.py +291 -0
- sqlspec/adapters/spanner/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/spanner/type_converter.py +331 -0
- sqlspec/adapters/sqlite/__init__.py +19 -0
- sqlspec/adapters/sqlite/_typing.py +80 -0
- sqlspec/adapters/sqlite/adk/__init__.py +5 -0
- sqlspec/adapters/sqlite/adk/store.py +958 -0
- sqlspec/adapters/sqlite/config.py +280 -0
- sqlspec/adapters/sqlite/core.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/sqlite/core.py +312 -0
- sqlspec/adapters/sqlite/data_dictionary.py +202 -0
- sqlspec/adapters/sqlite/driver.py +359 -0
- sqlspec/adapters/sqlite/events/__init__.py +5 -0
- sqlspec/adapters/sqlite/events/store.py +20 -0
- sqlspec/adapters/sqlite/litestar/__init__.py +5 -0
- sqlspec/adapters/sqlite/litestar/store.py +316 -0
- sqlspec/adapters/sqlite/pool.py +198 -0
- sqlspec/adapters/sqlite/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/adapters/sqlite/type_converter.py +114 -0
- sqlspec/base.py +747 -0
- sqlspec/builder/__init__.py +179 -0
- sqlspec/builder/_base.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_base.py +1022 -0
- sqlspec/builder/_column.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_column.py +521 -0
- sqlspec/builder/_ddl.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_ddl.py +1642 -0
- sqlspec/builder/_delete.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_delete.py +95 -0
- sqlspec/builder/_dml.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_dml.py +365 -0
- sqlspec/builder/_explain.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_explain.py +579 -0
- sqlspec/builder/_expression_wrappers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_expression_wrappers.py +46 -0
- sqlspec/builder/_factory.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_factory.py +1697 -0
- sqlspec/builder/_insert.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_insert.py +328 -0
- sqlspec/builder/_join.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_join.py +499 -0
- sqlspec/builder/_merge.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_merge.py +821 -0
- sqlspec/builder/_parsing_utils.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_parsing_utils.py +297 -0
- sqlspec/builder/_select.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_select.py +1660 -0
- sqlspec/builder/_temporal.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_temporal.py +139 -0
- sqlspec/builder/_update.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/builder/_update.py +173 -0
- sqlspec/builder/_vector_expressions.py +267 -0
- sqlspec/cli.py +911 -0
- sqlspec/config.py +1755 -0
- sqlspec/core/__init__.py +374 -0
- sqlspec/core/_correlation.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/_correlation.py +176 -0
- sqlspec/core/cache.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/cache.py +1069 -0
- sqlspec/core/compiler.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/compiler.py +954 -0
- sqlspec/core/explain.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/explain.py +275 -0
- sqlspec/core/filters.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/filters.py +952 -0
- sqlspec/core/hashing.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/hashing.py +262 -0
- sqlspec/core/metrics.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/metrics.py +83 -0
- sqlspec/core/parameters/__init__.py +71 -0
- sqlspec/core/parameters/_alignment.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_alignment.py +270 -0
- sqlspec/core/parameters/_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_converter.py +543 -0
- sqlspec/core/parameters/_processor.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_processor.py +505 -0
- sqlspec/core/parameters/_registry.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_registry.py +206 -0
- sqlspec/core/parameters/_transformers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_transformers.py +292 -0
- sqlspec/core/parameters/_types.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_types.py +499 -0
- sqlspec/core/parameters/_validator.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/parameters/_validator.py +180 -0
- sqlspec/core/pipeline.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/pipeline.py +319 -0
- sqlspec/core/query_modifiers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/query_modifiers.py +437 -0
- sqlspec/core/result/__init__.py +23 -0
- sqlspec/core/result/_base.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/result/_base.py +1121 -0
- sqlspec/core/result/_io.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/result/_io.py +28 -0
- sqlspec/core/splitter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/splitter.py +966 -0
- sqlspec/core/stack.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/stack.py +163 -0
- sqlspec/core/statement.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/statement.py +1503 -0
- sqlspec/core/type_converter.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/core/type_converter.py +339 -0
- sqlspec/data_dictionary/__init__.py +22 -0
- sqlspec/data_dictionary/_loader.py +123 -0
- sqlspec/data_dictionary/_registry.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/_registry.py +74 -0
- sqlspec/data_dictionary/_types.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/_types.py +121 -0
- sqlspec/data_dictionary/dialects/__init__.py +21 -0
- sqlspec/data_dictionary/dialects/bigquery.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/bigquery.py +49 -0
- sqlspec/data_dictionary/dialects/cockroachdb.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/cockroachdb.py +43 -0
- sqlspec/data_dictionary/dialects/duckdb.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/duckdb.py +47 -0
- sqlspec/data_dictionary/dialects/mysql.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/mysql.py +42 -0
- sqlspec/data_dictionary/dialects/oracle.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/oracle.py +34 -0
- sqlspec/data_dictionary/dialects/postgres.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/postgres.py +46 -0
- sqlspec/data_dictionary/dialects/spanner.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/spanner.py +37 -0
- sqlspec/data_dictionary/dialects/sqlite.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/data_dictionary/dialects/sqlite.py +42 -0
- sqlspec/data_dictionary/sql/.gitkeep +0 -0
- sqlspec/data_dictionary/sql/bigquery/columns.sql +23 -0
- sqlspec/data_dictionary/sql/bigquery/foreign_keys.sql +34 -0
- sqlspec/data_dictionary/sql/bigquery/indexes.sql +19 -0
- sqlspec/data_dictionary/sql/bigquery/tables.sql +33 -0
- sqlspec/data_dictionary/sql/bigquery/version.sql +3 -0
- sqlspec/data_dictionary/sql/cockroachdb/columns.sql +34 -0
- sqlspec/data_dictionary/sql/cockroachdb/foreign_keys.sql +40 -0
- sqlspec/data_dictionary/sql/cockroachdb/indexes.sql +32 -0
- sqlspec/data_dictionary/sql/cockroachdb/tables.sql +44 -0
- sqlspec/data_dictionary/sql/cockroachdb/version.sql +3 -0
- sqlspec/data_dictionary/sql/duckdb/columns.sql +23 -0
- sqlspec/data_dictionary/sql/duckdb/foreign_keys.sql +36 -0
- sqlspec/data_dictionary/sql/duckdb/indexes.sql +19 -0
- sqlspec/data_dictionary/sql/duckdb/tables.sql +38 -0
- sqlspec/data_dictionary/sql/duckdb/version.sql +3 -0
- sqlspec/data_dictionary/sql/mysql/columns.sql +23 -0
- sqlspec/data_dictionary/sql/mysql/foreign_keys.sql +28 -0
- sqlspec/data_dictionary/sql/mysql/indexes.sql +26 -0
- sqlspec/data_dictionary/sql/mysql/tables.sql +33 -0
- sqlspec/data_dictionary/sql/mysql/version.sql +3 -0
- sqlspec/data_dictionary/sql/oracle/columns.sql +23 -0
- sqlspec/data_dictionary/sql/oracle/foreign_keys.sql +48 -0
- sqlspec/data_dictionary/sql/oracle/indexes.sql +44 -0
- sqlspec/data_dictionary/sql/oracle/tables.sql +25 -0
- sqlspec/data_dictionary/sql/oracle/version.sql +20 -0
- sqlspec/data_dictionary/sql/postgres/columns.sql +34 -0
- sqlspec/data_dictionary/sql/postgres/foreign_keys.sql +40 -0
- sqlspec/data_dictionary/sql/postgres/indexes.sql +56 -0
- sqlspec/data_dictionary/sql/postgres/tables.sql +44 -0
- sqlspec/data_dictionary/sql/postgres/version.sql +3 -0
- sqlspec/data_dictionary/sql/spanner/columns.sql +23 -0
- sqlspec/data_dictionary/sql/spanner/foreign_keys.sql +70 -0
- sqlspec/data_dictionary/sql/spanner/indexes.sql +30 -0
- sqlspec/data_dictionary/sql/spanner/tables.sql +9 -0
- sqlspec/data_dictionary/sql/spanner/version.sql +3 -0
- sqlspec/data_dictionary/sql/sqlite/columns.sql +23 -0
- sqlspec/data_dictionary/sql/sqlite/foreign_keys.sql +22 -0
- sqlspec/data_dictionary/sql/sqlite/indexes.sql +7 -0
- sqlspec/data_dictionary/sql/sqlite/tables.sql +28 -0
- sqlspec/data_dictionary/sql/sqlite/version.sql +3 -0
- sqlspec/driver/__init__.py +32 -0
- sqlspec/driver/_async.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/driver/_async.py +1737 -0
- sqlspec/driver/_common.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/driver/_common.py +1478 -0
- sqlspec/driver/_sql_helpers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/driver/_sql_helpers.py +148 -0
- sqlspec/driver/_storage_helpers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/driver/_storage_helpers.py +144 -0
- sqlspec/driver/_sync.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/driver/_sync.py +1710 -0
- sqlspec/exceptions.py +338 -0
- sqlspec/extensions/__init__.py +0 -0
- sqlspec/extensions/adk/__init__.py +70 -0
- sqlspec/extensions/adk/_types.py +51 -0
- sqlspec/extensions/adk/converters.py +172 -0
- sqlspec/extensions/adk/memory/__init__.py +69 -0
- sqlspec/extensions/adk/memory/_types.py +30 -0
- sqlspec/extensions/adk/memory/converters.py +149 -0
- sqlspec/extensions/adk/memory/service.py +217 -0
- sqlspec/extensions/adk/memory/store.py +569 -0
- sqlspec/extensions/adk/migrations/0001_create_adk_tables.py +246 -0
- sqlspec/extensions/adk/migrations/__init__.py +0 -0
- sqlspec/extensions/adk/service.py +225 -0
- sqlspec/extensions/adk/store.py +567 -0
- sqlspec/extensions/events/__init__.py +51 -0
- sqlspec/extensions/events/_channel.py +703 -0
- sqlspec/extensions/events/_hints.py +45 -0
- sqlspec/extensions/events/_models.py +23 -0
- sqlspec/extensions/events/_payload.py +69 -0
- sqlspec/extensions/events/_protocols.py +134 -0
- sqlspec/extensions/events/_queue.py +461 -0
- sqlspec/extensions/events/_store.py +209 -0
- sqlspec/extensions/events/migrations/0001_create_event_queue.py +59 -0
- sqlspec/extensions/events/migrations/__init__.py +3 -0
- sqlspec/extensions/fastapi/__init__.py +19 -0
- sqlspec/extensions/fastapi/extension.py +351 -0
- sqlspec/extensions/fastapi/providers.py +607 -0
- sqlspec/extensions/flask/__init__.py +37 -0
- sqlspec/extensions/flask/_state.py +76 -0
- sqlspec/extensions/flask/_utils.py +71 -0
- sqlspec/extensions/flask/extension.py +519 -0
- sqlspec/extensions/litestar/__init__.py +28 -0
- sqlspec/extensions/litestar/_utils.py +52 -0
- sqlspec/extensions/litestar/channels.py +165 -0
- sqlspec/extensions/litestar/cli.py +102 -0
- sqlspec/extensions/litestar/config.py +90 -0
- sqlspec/extensions/litestar/handlers.py +316 -0
- sqlspec/extensions/litestar/migrations/0001_create_session_table.py +137 -0
- sqlspec/extensions/litestar/migrations/__init__.py +3 -0
- sqlspec/extensions/litestar/plugin.py +671 -0
- sqlspec/extensions/litestar/providers.py +526 -0
- sqlspec/extensions/litestar/store.py +296 -0
- sqlspec/extensions/otel/__init__.py +58 -0
- sqlspec/extensions/prometheus/__init__.py +113 -0
- sqlspec/extensions/starlette/__init__.py +19 -0
- sqlspec/extensions/starlette/_state.py +30 -0
- sqlspec/extensions/starlette/_utils.py +96 -0
- sqlspec/extensions/starlette/extension.py +346 -0
- sqlspec/extensions/starlette/middleware.py +235 -0
- sqlspec/loader.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/loader.py +702 -0
- sqlspec/migrations/__init__.py +36 -0
- sqlspec/migrations/base.py +731 -0
- sqlspec/migrations/commands.py +1232 -0
- sqlspec/migrations/context.py +157 -0
- sqlspec/migrations/fix.py +204 -0
- sqlspec/migrations/loaders.py +443 -0
- sqlspec/migrations/runner.py +1172 -0
- sqlspec/migrations/templates.py +234 -0
- sqlspec/migrations/tracker.py +611 -0
- sqlspec/migrations/utils.py +256 -0
- sqlspec/migrations/validation.py +207 -0
- sqlspec/migrations/version.py +446 -0
- sqlspec/observability/__init__.py +55 -0
- sqlspec/observability/_common.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_common.py +77 -0
- sqlspec/observability/_config.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_config.py +348 -0
- sqlspec/observability/_diagnostics.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_diagnostics.py +74 -0
- sqlspec/observability/_dispatcher.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_dispatcher.py +152 -0
- sqlspec/observability/_formatters/__init__.py +13 -0
- sqlspec/observability/_formatters/_aws.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_formatters/_aws.py +102 -0
- sqlspec/observability/_formatters/_azure.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_formatters/_azure.py +96 -0
- sqlspec/observability/_formatters/_base.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_formatters/_base.py +57 -0
- sqlspec/observability/_formatters/_gcp.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_formatters/_gcp.py +131 -0
- sqlspec/observability/_formatting.py +58 -0
- sqlspec/observability/_observer.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_observer.py +357 -0
- sqlspec/observability/_runtime.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_runtime.py +420 -0
- sqlspec/observability/_sampling.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_sampling.py +188 -0
- sqlspec/observability/_spans.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/observability/_spans.py +161 -0
- sqlspec/protocols.py +916 -0
- sqlspec/py.typed +0 -0
- sqlspec/storage/__init__.py +48 -0
- sqlspec/storage/_utils.py +104 -0
- sqlspec/storage/backends/__init__.py +1 -0
- sqlspec/storage/backends/base.py +253 -0
- sqlspec/storage/backends/fsspec.py +529 -0
- sqlspec/storage/backends/local.py +441 -0
- sqlspec/storage/backends/obstore.py +916 -0
- sqlspec/storage/errors.py +104 -0
- sqlspec/storage/pipeline.py +582 -0
- sqlspec/storage/registry.py +301 -0
- sqlspec/typing.py +395 -0
- sqlspec/utils/__init__.py +7 -0
- sqlspec/utils/arrow_helpers.py +318 -0
- sqlspec/utils/config_tools.py +332 -0
- sqlspec/utils/correlation.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/correlation.py +134 -0
- sqlspec/utils/deprecation.py +190 -0
- sqlspec/utils/fixtures.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/fixtures.py +258 -0
- sqlspec/utils/logging.py +222 -0
- sqlspec/utils/module_loader.py +306 -0
- sqlspec/utils/portal.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/portal.py +375 -0
- sqlspec/utils/schema.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/schema.py +485 -0
- sqlspec/utils/serializers.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/serializers.py +408 -0
- sqlspec/utils/singleton.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/singleton.py +41 -0
- sqlspec/utils/sync_tools.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/sync_tools.py +311 -0
- sqlspec/utils/text.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/text.py +108 -0
- sqlspec/utils/type_converters.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/type_converters.py +128 -0
- sqlspec/utils/type_guards.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/type_guards.py +1360 -0
- sqlspec/utils/uuids.cpython-310-aarch64-linux-gnu.so +0 -0
- sqlspec/utils/uuids.py +225 -0
- sqlspec-0.36.0.dist-info/METADATA +205 -0
- sqlspec-0.36.0.dist-info/RECORD +531 -0
- sqlspec-0.36.0.dist-info/WHEEL +7 -0
- sqlspec-0.36.0.dist-info/entry_points.txt +2 -0
- sqlspec-0.36.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"""Storage registry for ObjectStore backends.
|
|
2
|
+
|
|
3
|
+
Provides a storage registry that supports URI-first access
|
|
4
|
+
pattern with automatic backend detection, ObStore preferred with FSSpec fallback,
|
|
5
|
+
scheme-based routing, and named aliases for common configurations.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
import re
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Any, Final, cast
|
|
12
|
+
|
|
13
|
+
from mypy_extensions import mypyc_attr
|
|
14
|
+
|
|
15
|
+
from sqlspec.exceptions import ImproperConfigurationError, MissingDependencyError
|
|
16
|
+
from sqlspec.protocols import ObjectStoreProtocol
|
|
17
|
+
from sqlspec.typing import FSSPEC_INSTALLED, OBSTORE_INSTALLED
|
|
18
|
+
from sqlspec.utils.logging import get_logger, log_with_context
|
|
19
|
+
from sqlspec.utils.type_guards import is_local_path
|
|
20
|
+
|
|
21
|
+
__all__ = ("StorageRegistry", "storage_registry")
|
|
22
|
+
|
|
23
|
+
logger = get_logger(__name__)
|
|
24
|
+
|
|
25
|
+
SCHEME_REGEX: Final = re.compile(r"([a-zA-Z0-9+.-]+)://")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
FSSPEC_ONLY_SCHEMES: Final[frozenset[str]] = frozenset({"http", "https", "ftp", "sftp", "ssh"})
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
32
|
+
class StorageRegistry:
|
|
33
|
+
"""Global storage registry for named backend configurations.
|
|
34
|
+
|
|
35
|
+
Allows registering named storage backends that can be accessed from anywhere
|
|
36
|
+
in your application. Backends are automatically selected based on URI scheme
|
|
37
|
+
unless explicitly overridden.
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
backend = registry.get("s3://my-bucket")
|
|
41
|
+
backend = registry.get("file:///tmp/data")
|
|
42
|
+
backend = registry.get("gs://my-gcs-bucket")
|
|
43
|
+
|
|
44
|
+
registry.register_alias("my_app_store", "file:///tmp/dev_data")
|
|
45
|
+
|
|
46
|
+
registry.register_alias("my_app_store", "s3://prod-bucket/data")
|
|
47
|
+
|
|
48
|
+
store = registry.get("my_app_store")
|
|
49
|
+
|
|
50
|
+
backend = registry.get("s3://bucket", backend="fsspec")
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
__slots__ = ("_alias_configs", "_aliases", "_cache", "_instances")
|
|
54
|
+
|
|
55
|
+
def __init__(self) -> None:
|
|
56
|
+
self._alias_configs: dict[str, tuple[type[ObjectStoreProtocol], str, dict[str, Any]]] = {}
|
|
57
|
+
self._aliases: dict[str, dict[str, Any]] = {}
|
|
58
|
+
self._instances: dict[str | tuple[str, tuple[tuple[str, Any], ...]], ObjectStoreProtocol] = {}
|
|
59
|
+
self._cache: dict[str, tuple[str, type[ObjectStoreProtocol]]] = {}
|
|
60
|
+
|
|
61
|
+
def _make_hashable(self, obj: Any) -> Any:
|
|
62
|
+
"""Convert nested dict/list structures to hashable tuples."""
|
|
63
|
+
if isinstance(obj, dict):
|
|
64
|
+
return tuple(sorted((k, self._make_hashable(v)) for k, v in obj.items()))
|
|
65
|
+
if isinstance(obj, list):
|
|
66
|
+
return tuple(self._make_hashable(item) for item in obj)
|
|
67
|
+
if isinstance(obj, set):
|
|
68
|
+
return tuple(sorted(self._make_hashable(item) for item in obj))
|
|
69
|
+
return obj
|
|
70
|
+
|
|
71
|
+
def register_alias(
|
|
72
|
+
self, alias: str, uri: str, *, backend: str | None = None, base_path: str = "", **kwargs: Any
|
|
73
|
+
) -> None:
|
|
74
|
+
"""Register a named alias for a storage configuration.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
alias: Unique alias name (e.g., "my_app_store", "user_uploads")
|
|
78
|
+
uri: Storage URI (e.g., "s3://bucket", "file:///path", "gs://bucket")
|
|
79
|
+
backend: Force specific backend ("local", "fsspec", "obstore") instead of auto-detection
|
|
80
|
+
base_path: Base path to prepend to all operations
|
|
81
|
+
**kwargs: Backend-specific configuration options
|
|
82
|
+
"""
|
|
83
|
+
backend_cls = self._get_backend_class(backend) if backend else self._determine_backend_class(uri)
|
|
84
|
+
|
|
85
|
+
backend_config = dict(kwargs)
|
|
86
|
+
if base_path:
|
|
87
|
+
backend_config["base_path"] = base_path
|
|
88
|
+
self._alias_configs[alias] = (backend_cls, uri, backend_config)
|
|
89
|
+
|
|
90
|
+
test_config = dict(backend_config)
|
|
91
|
+
test_config["uri"] = uri
|
|
92
|
+
self._aliases[alias] = test_config
|
|
93
|
+
log_with_context(
|
|
94
|
+
logger,
|
|
95
|
+
logging.DEBUG,
|
|
96
|
+
"storage.alias.register",
|
|
97
|
+
alias=alias,
|
|
98
|
+
uri=uri,
|
|
99
|
+
backend_type=backend_cls.__name__,
|
|
100
|
+
base_path=base_path or None,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
def get(self, uri_or_alias: str | Path, *, backend: str | None = None, **kwargs: Any) -> ObjectStoreProtocol:
|
|
104
|
+
"""Get backend instance using URI-first routing with automatic backend selection.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
uri_or_alias: URI to resolve directly OR named alias (e.g., "my_app_store")
|
|
108
|
+
backend: Force specific backend ("local", "fsspec", "obstore") instead of auto-selection
|
|
109
|
+
**kwargs: Additional backend-specific configuration options
|
|
110
|
+
|
|
111
|
+
Returns:
|
|
112
|
+
Backend instance with automatic backend selection
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
ImproperConfigurationError: If alias not found or invalid input
|
|
116
|
+
"""
|
|
117
|
+
if not uri_or_alias:
|
|
118
|
+
msg = "URI or alias cannot be empty."
|
|
119
|
+
raise ImproperConfigurationError(msg)
|
|
120
|
+
|
|
121
|
+
if isinstance(uri_or_alias, Path):
|
|
122
|
+
uri_or_alias = f"file://{uri_or_alias.resolve()}"
|
|
123
|
+
|
|
124
|
+
cache_params = dict(kwargs)
|
|
125
|
+
if backend:
|
|
126
|
+
cache_params["__backend__"] = backend
|
|
127
|
+
cache_key = (uri_or_alias, self._make_hashable(cache_params)) if cache_params else uri_or_alias
|
|
128
|
+
if cache_key in self._instances:
|
|
129
|
+
log_with_context(logger, logging.DEBUG, "storage.resolve", uri_or_alias=str(uri_or_alias), cached=True)
|
|
130
|
+
return self._instances[cache_key]
|
|
131
|
+
scheme = self._get_scheme(uri_or_alias)
|
|
132
|
+
if not scheme and is_local_path(uri_or_alias):
|
|
133
|
+
scheme = "file"
|
|
134
|
+
uri_or_alias = f"file://{uri_or_alias}"
|
|
135
|
+
|
|
136
|
+
if scheme:
|
|
137
|
+
instance = self._resolve_from_uri(uri_or_alias, backend_override=backend, **kwargs)
|
|
138
|
+
elif uri_or_alias in self._alias_configs:
|
|
139
|
+
backend_cls, stored_uri, config = self._alias_configs[uri_or_alias]
|
|
140
|
+
if backend:
|
|
141
|
+
backend_cls = self._get_backend_class(backend)
|
|
142
|
+
instance = backend_cls(stored_uri, **{**config, **kwargs})
|
|
143
|
+
else:
|
|
144
|
+
msg = f"Unknown storage alias or invalid URI: '{uri_or_alias}'"
|
|
145
|
+
raise ImproperConfigurationError(msg)
|
|
146
|
+
self._instances[cache_key] = instance
|
|
147
|
+
log_with_context(logger, logging.DEBUG, "storage.resolve", uri_or_alias=str(uri_or_alias), cached=False)
|
|
148
|
+
return instance
|
|
149
|
+
|
|
150
|
+
def _resolve_from_uri(self, uri: str, *, backend_override: str | None = None, **kwargs: Any) -> ObjectStoreProtocol:
|
|
151
|
+
"""Resolve backend from URI with optional backend override.
|
|
152
|
+
|
|
153
|
+
Backend selection priority for local files (file:// or bare paths):
|
|
154
|
+
1. obstore (if installed) - provides async I/O performance
|
|
155
|
+
2. fsspec (if installed) - async wrapper fallback
|
|
156
|
+
3. local (always available) - zero-dependency sync backend
|
|
157
|
+
|
|
158
|
+
For cloud storage, prefer obstore over fsspec when available.
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
uri: Storage URI to resolve.
|
|
162
|
+
backend_override: Force specific backend type.
|
|
163
|
+
**kwargs: Additional backend configuration.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
Configured backend instance.
|
|
167
|
+
|
|
168
|
+
Raises:
|
|
169
|
+
MissingDependencyError: No backend available for URI scheme.
|
|
170
|
+
"""
|
|
171
|
+
if backend_override:
|
|
172
|
+
return self._create_backend(backend_override, uri, **kwargs)
|
|
173
|
+
|
|
174
|
+
scheme = self._get_scheme(uri)
|
|
175
|
+
|
|
176
|
+
if scheme in {None, "file"}:
|
|
177
|
+
if OBSTORE_INSTALLED:
|
|
178
|
+
try:
|
|
179
|
+
return self._create_backend("obstore", uri, **kwargs)
|
|
180
|
+
except (ValueError, ImportError, NotImplementedError):
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
if FSSPEC_INSTALLED:
|
|
184
|
+
try:
|
|
185
|
+
return self._create_backend("fsspec", uri, **kwargs)
|
|
186
|
+
except (ValueError, ImportError, NotImplementedError):
|
|
187
|
+
pass
|
|
188
|
+
|
|
189
|
+
return self._create_backend("local", uri, **kwargs)
|
|
190
|
+
|
|
191
|
+
if scheme not in FSSPEC_ONLY_SCHEMES and OBSTORE_INSTALLED:
|
|
192
|
+
try:
|
|
193
|
+
return self._create_backend("obstore", uri, **kwargs)
|
|
194
|
+
except (ValueError, ImportError, NotImplementedError):
|
|
195
|
+
pass
|
|
196
|
+
|
|
197
|
+
if FSSPEC_INSTALLED:
|
|
198
|
+
try:
|
|
199
|
+
return self._create_backend("fsspec", uri, **kwargs)
|
|
200
|
+
except (ValueError, ImportError, NotImplementedError):
|
|
201
|
+
pass
|
|
202
|
+
|
|
203
|
+
msg = f"No backend available for URI scheme '{scheme}'. Install obstore or fsspec for cloud storage support."
|
|
204
|
+
raise MissingDependencyError(msg)
|
|
205
|
+
|
|
206
|
+
def _determine_backend_class(self, uri: str) -> type[ObjectStoreProtocol]:
|
|
207
|
+
"""Determine the backend class for a URI based on availability.
|
|
208
|
+
|
|
209
|
+
Args:
|
|
210
|
+
uri: Storage URI to analyze.
|
|
211
|
+
|
|
212
|
+
Returns:
|
|
213
|
+
Backend class type to use.
|
|
214
|
+
|
|
215
|
+
Raises:
|
|
216
|
+
MissingDependencyError: No backend available for URI scheme.
|
|
217
|
+
"""
|
|
218
|
+
scheme = self._get_scheme(uri)
|
|
219
|
+
|
|
220
|
+
if scheme in {None, "file"}:
|
|
221
|
+
if OBSTORE_INSTALLED:
|
|
222
|
+
return self._get_backend_class("obstore")
|
|
223
|
+
if FSSPEC_INSTALLED:
|
|
224
|
+
return self._get_backend_class("fsspec")
|
|
225
|
+
return self._get_backend_class("local")
|
|
226
|
+
|
|
227
|
+
if scheme in FSSPEC_ONLY_SCHEMES:
|
|
228
|
+
if not FSSPEC_INSTALLED:
|
|
229
|
+
msg = f"Scheme '{scheme}' requires fsspec. Install with: pip install fsspec"
|
|
230
|
+
raise MissingDependencyError(msg)
|
|
231
|
+
return self._get_backend_class("fsspec")
|
|
232
|
+
|
|
233
|
+
if OBSTORE_INSTALLED:
|
|
234
|
+
return self._get_backend_class("obstore")
|
|
235
|
+
|
|
236
|
+
if FSSPEC_INSTALLED:
|
|
237
|
+
return self._get_backend_class("fsspec")
|
|
238
|
+
|
|
239
|
+
msg = f"No backend available for URI scheme '{scheme}'. Install obstore or fsspec for cloud storage support."
|
|
240
|
+
raise MissingDependencyError(msg)
|
|
241
|
+
|
|
242
|
+
def _get_backend_class(self, backend_type: str) -> type[ObjectStoreProtocol]:
|
|
243
|
+
"""Get backend class by type name."""
|
|
244
|
+
if backend_type == "local":
|
|
245
|
+
from sqlspec.storage.backends.local import LocalStore
|
|
246
|
+
|
|
247
|
+
return cast("type[ObjectStoreProtocol]", LocalStore)
|
|
248
|
+
if backend_type == "obstore":
|
|
249
|
+
from sqlspec.storage.backends.obstore import ObStoreBackend
|
|
250
|
+
|
|
251
|
+
return cast("type[ObjectStoreProtocol]", ObStoreBackend)
|
|
252
|
+
if backend_type == "fsspec":
|
|
253
|
+
from sqlspec.storage.backends.fsspec import FSSpecBackend
|
|
254
|
+
|
|
255
|
+
return cast("type[ObjectStoreProtocol]", FSSpecBackend)
|
|
256
|
+
msg = f"Unknown backend type: {backend_type}. Supported types: 'local', 'obstore', 'fsspec'"
|
|
257
|
+
raise ValueError(msg)
|
|
258
|
+
|
|
259
|
+
def _create_backend(self, backend_type: str, uri: str, **kwargs: Any) -> ObjectStoreProtocol:
|
|
260
|
+
"""Create backend instance for URI."""
|
|
261
|
+
return self._get_backend_class(backend_type)(uri, **kwargs)
|
|
262
|
+
|
|
263
|
+
def _get_scheme(self, uri: str) -> str | None:
|
|
264
|
+
"""Extract the scheme from a URI using regex."""
|
|
265
|
+
if not uri:
|
|
266
|
+
return None
|
|
267
|
+
match = SCHEME_REGEX.match(uri)
|
|
268
|
+
return match.group(1).lower() if match else None
|
|
269
|
+
|
|
270
|
+
def is_alias_registered(self, alias: str) -> bool:
|
|
271
|
+
"""Check if a named alias is registered."""
|
|
272
|
+
return alias in self._alias_configs
|
|
273
|
+
|
|
274
|
+
def list_aliases(self) -> "list[str]":
|
|
275
|
+
"""List all registered aliases."""
|
|
276
|
+
return list(self._alias_configs.keys())
|
|
277
|
+
|
|
278
|
+
def clear_cache(self, uri_or_alias: str | None = None) -> None:
|
|
279
|
+
"""Clear resolved backend cache."""
|
|
280
|
+
if uri_or_alias:
|
|
281
|
+
self._instances.pop(uri_or_alias, None)
|
|
282
|
+
else:
|
|
283
|
+
self._instances.clear()
|
|
284
|
+
|
|
285
|
+
def clear(self) -> None:
|
|
286
|
+
"""Clear all aliases and instances."""
|
|
287
|
+
self._alias_configs.clear()
|
|
288
|
+
self._aliases.clear()
|
|
289
|
+
self._instances.clear()
|
|
290
|
+
|
|
291
|
+
def clear_instances(self) -> None:
|
|
292
|
+
"""Clear only cached instances, keeping aliases."""
|
|
293
|
+
self._instances.clear()
|
|
294
|
+
|
|
295
|
+
def clear_aliases(self) -> None:
|
|
296
|
+
"""Clear only aliases, keeping cached instances."""
|
|
297
|
+
self._alias_configs.clear()
|
|
298
|
+
self._aliases.clear()
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
storage_registry = StorageRegistry()
|
sqlspec/typing.py
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
# pyright: ignore[reportAttributeAccessIssue]
|
|
2
|
+
from collections.abc import Iterator
|
|
3
|
+
from functools import lru_cache
|
|
4
|
+
from typing import Annotated, Any, Literal, Protocol, TypeAlias, TypedDict, _TypedDict # pyright: ignore
|
|
5
|
+
|
|
6
|
+
from typing_extensions import TypeVar
|
|
7
|
+
|
|
8
|
+
from sqlspec._typing import (
|
|
9
|
+
ALLOYDB_CONNECTOR_INSTALLED,
|
|
10
|
+
ATTRS_INSTALLED,
|
|
11
|
+
CATTRS_INSTALLED,
|
|
12
|
+
CLOUD_SQL_CONNECTOR_INSTALLED,
|
|
13
|
+
FSSPEC_INSTALLED,
|
|
14
|
+
LITESTAR_INSTALLED,
|
|
15
|
+
MSGSPEC_INSTALLED,
|
|
16
|
+
NANOID_INSTALLED,
|
|
17
|
+
NUMPY_INSTALLED,
|
|
18
|
+
OBSTORE_INSTALLED,
|
|
19
|
+
OPENTELEMETRY_INSTALLED,
|
|
20
|
+
ORJSON_INSTALLED,
|
|
21
|
+
PANDAS_INSTALLED,
|
|
22
|
+
PGVECTOR_INSTALLED,
|
|
23
|
+
POLARS_INSTALLED,
|
|
24
|
+
PROMETHEUS_INSTALLED,
|
|
25
|
+
PYARROW_INSTALLED,
|
|
26
|
+
PYDANTIC_INSTALLED,
|
|
27
|
+
UNSET,
|
|
28
|
+
UUID_UTILS_INSTALLED,
|
|
29
|
+
ArrowRecordBatch,
|
|
30
|
+
ArrowRecordBatchReader,
|
|
31
|
+
ArrowRecordBatchReaderProtocol,
|
|
32
|
+
ArrowSchema,
|
|
33
|
+
ArrowSchemaProtocol,
|
|
34
|
+
ArrowTable,
|
|
35
|
+
AttrsInstance,
|
|
36
|
+
AttrsInstanceStub,
|
|
37
|
+
BaseModel,
|
|
38
|
+
BaseModelStub,
|
|
39
|
+
Counter,
|
|
40
|
+
DataclassProtocol,
|
|
41
|
+
DTOData,
|
|
42
|
+
Empty,
|
|
43
|
+
EmptyEnum,
|
|
44
|
+
EmptyType,
|
|
45
|
+
FailFast,
|
|
46
|
+
Gauge,
|
|
47
|
+
Histogram,
|
|
48
|
+
NumpyArray,
|
|
49
|
+
PandasDataFrame,
|
|
50
|
+
PolarsDataFrame,
|
|
51
|
+
Span,
|
|
52
|
+
Status,
|
|
53
|
+
StatusCode,
|
|
54
|
+
Struct,
|
|
55
|
+
StructStub,
|
|
56
|
+
Tracer,
|
|
57
|
+
TypeAdapter,
|
|
58
|
+
UnsetType,
|
|
59
|
+
attrs_asdict,
|
|
60
|
+
attrs_define,
|
|
61
|
+
attrs_field,
|
|
62
|
+
attrs_fields,
|
|
63
|
+
attrs_has,
|
|
64
|
+
cattrs_structure,
|
|
65
|
+
cattrs_unstructure,
|
|
66
|
+
convert,
|
|
67
|
+
module_available,
|
|
68
|
+
trace,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class DictLike(Protocol):
|
|
73
|
+
"""A protocol for objects that behave like a dictionary for reading."""
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any: ...
|
|
76
|
+
def __iter__(self) -> Iterator[str]: ...
|
|
77
|
+
def __len__(self) -> int: ...
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
PYDANTIC_USE_FAILFAST = False
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class ForeignKeyMetadata:
|
|
84
|
+
"""Metadata for a foreign key constraint."""
|
|
85
|
+
|
|
86
|
+
__slots__ = (
|
|
87
|
+
"column_name",
|
|
88
|
+
"constraint_name",
|
|
89
|
+
"referenced_column",
|
|
90
|
+
"referenced_schema",
|
|
91
|
+
"referenced_table",
|
|
92
|
+
"schema",
|
|
93
|
+
"table_name",
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
def __init__(
|
|
97
|
+
self,
|
|
98
|
+
table_name: str,
|
|
99
|
+
column_name: str,
|
|
100
|
+
referenced_table: str,
|
|
101
|
+
referenced_column: str,
|
|
102
|
+
constraint_name: str | None = None,
|
|
103
|
+
schema: str | None = None,
|
|
104
|
+
referenced_schema: str | None = None,
|
|
105
|
+
) -> None:
|
|
106
|
+
self.table_name = table_name
|
|
107
|
+
self.column_name = column_name
|
|
108
|
+
self.referenced_table = referenced_table
|
|
109
|
+
self.referenced_column = referenced_column
|
|
110
|
+
self.constraint_name = constraint_name
|
|
111
|
+
self.schema = schema
|
|
112
|
+
self.referenced_schema = referenced_schema
|
|
113
|
+
|
|
114
|
+
def __repr__(self) -> str:
|
|
115
|
+
return (
|
|
116
|
+
f"ForeignKeyMetadata(table_name={self.table_name!r}, column_name={self.column_name!r}, "
|
|
117
|
+
f"referenced_table={self.referenced_table!r}, referenced_column={self.referenced_column!r}, "
|
|
118
|
+
f"constraint_name={self.constraint_name!r}, schema={self.schema!r}, "
|
|
119
|
+
f"referenced_schema={self.referenced_schema!r})"
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def __eq__(self, other: object) -> bool:
|
|
123
|
+
if not isinstance(other, ForeignKeyMetadata):
|
|
124
|
+
return NotImplemented
|
|
125
|
+
return (
|
|
126
|
+
self.table_name == other.table_name
|
|
127
|
+
and self.column_name == other.column_name
|
|
128
|
+
and self.referenced_table == other.referenced_table
|
|
129
|
+
and self.referenced_column == other.referenced_column
|
|
130
|
+
and self.constraint_name == other.constraint_name
|
|
131
|
+
and self.schema == other.schema
|
|
132
|
+
and self.referenced_schema == other.referenced_schema
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
def __hash__(self) -> int:
|
|
136
|
+
return hash((
|
|
137
|
+
self.table_name,
|
|
138
|
+
self.column_name,
|
|
139
|
+
self.referenced_table,
|
|
140
|
+
self.referenced_column,
|
|
141
|
+
self.constraint_name,
|
|
142
|
+
self.schema,
|
|
143
|
+
self.referenced_schema,
|
|
144
|
+
))
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class ColumnMetadata(TypedDict, total=False):
|
|
148
|
+
"""Metadata for a database column."""
|
|
149
|
+
|
|
150
|
+
schema_name: str
|
|
151
|
+
table_name: str
|
|
152
|
+
column_name: str
|
|
153
|
+
data_type: str
|
|
154
|
+
is_nullable: str | bool | None
|
|
155
|
+
column_default: str | None
|
|
156
|
+
ordinal_position: int
|
|
157
|
+
max_length: int
|
|
158
|
+
numeric_precision: int
|
|
159
|
+
numeric_scale: int
|
|
160
|
+
is_primary: bool | int
|
|
161
|
+
is_unique: bool | int
|
|
162
|
+
extra: str
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class TableMetadata(TypedDict, total=False):
|
|
166
|
+
"""Metadata for a database table."""
|
|
167
|
+
|
|
168
|
+
schema_name: str
|
|
169
|
+
table_name: str
|
|
170
|
+
table_type: str
|
|
171
|
+
table_catalog: str
|
|
172
|
+
table_schema: str
|
|
173
|
+
dependency_level: int
|
|
174
|
+
level: int
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class IndexMetadata(TypedDict, total=False):
|
|
178
|
+
"""Metadata for a database index."""
|
|
179
|
+
|
|
180
|
+
schema_name: str
|
|
181
|
+
table_name: str
|
|
182
|
+
index_name: str
|
|
183
|
+
columns: list[str] | str | None
|
|
184
|
+
is_unique: bool | int
|
|
185
|
+
is_primary: bool | int
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class VersionInfo:
|
|
189
|
+
"""Parsed database version info."""
|
|
190
|
+
|
|
191
|
+
def __init__(self, major: int, minor: int = 0, patch: int = 0) -> None:
|
|
192
|
+
"""Initialize version info.
|
|
193
|
+
|
|
194
|
+
Args:
|
|
195
|
+
major: Major version number
|
|
196
|
+
minor: Minor version number
|
|
197
|
+
patch: Patch version number
|
|
198
|
+
"""
|
|
199
|
+
self.major = major
|
|
200
|
+
self.minor = minor
|
|
201
|
+
self.patch = patch
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
def version_tuple(self) -> "tuple[int, int, int]":
|
|
205
|
+
"""Get version as tuple for comparison."""
|
|
206
|
+
return (self.major, self.minor, self.patch)
|
|
207
|
+
|
|
208
|
+
def __str__(self) -> str:
|
|
209
|
+
"""String representation of version info."""
|
|
210
|
+
return f"{self.major}.{self.minor}.{self.patch}"
|
|
211
|
+
|
|
212
|
+
def __repr__(self) -> str:
|
|
213
|
+
"""Detailed string representation."""
|
|
214
|
+
return f"VersionInfo({self.major}, {self.minor}, {self.patch})"
|
|
215
|
+
|
|
216
|
+
def __eq__(self, other: object) -> bool:
|
|
217
|
+
"""Check version equality."""
|
|
218
|
+
if not isinstance(other, VersionInfo):
|
|
219
|
+
return NotImplemented
|
|
220
|
+
return self.version_tuple == other.version_tuple
|
|
221
|
+
|
|
222
|
+
def __lt__(self, other: "VersionInfo") -> bool:
|
|
223
|
+
"""Check if this version is less than another."""
|
|
224
|
+
return self.version_tuple < other.version_tuple
|
|
225
|
+
|
|
226
|
+
def __le__(self, other: "VersionInfo") -> bool:
|
|
227
|
+
"""Check if this version is less than or equal to another."""
|
|
228
|
+
return self.version_tuple <= other.version_tuple
|
|
229
|
+
|
|
230
|
+
def __gt__(self, other: "VersionInfo") -> bool:
|
|
231
|
+
"""Check if this version is greater than another."""
|
|
232
|
+
return self.version_tuple > other.version_tuple
|
|
233
|
+
|
|
234
|
+
def __ge__(self, other: "VersionInfo") -> bool:
|
|
235
|
+
"""Check if this version is greater than or equal to another."""
|
|
236
|
+
return self.version_tuple >= other.version_tuple
|
|
237
|
+
|
|
238
|
+
def __hash__(self) -> int:
|
|
239
|
+
"""Make VersionInfo hashable based on version tuple."""
|
|
240
|
+
return hash(self.version_tuple)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
VersionCacheResult: TypeAlias = "tuple[bool, VersionInfo | None]"
|
|
244
|
+
"""Return type for version cache lookup methods.
|
|
245
|
+
|
|
246
|
+
The tuple contains:
|
|
247
|
+
|
|
248
|
+
- First element (``bool``): Whether a cache lookup was attempted
|
|
249
|
+
|
|
250
|
+
- ``True``: A lookup was attempted; check second element for result
|
|
251
|
+
- ``False``: No lookup was attempted yet; second element is always ``None``
|
|
252
|
+
|
|
253
|
+
- Second element (``VersionInfo | None``): The cached version info
|
|
254
|
+
|
|
255
|
+
- ``VersionInfo``: Successfully detected and cached version
|
|
256
|
+
- ``None``: Version not yet fetched, or detection failed
|
|
257
|
+
"""
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
T = TypeVar("T")
|
|
261
|
+
ConnectionT = TypeVar("ConnectionT")
|
|
262
|
+
"""Type variable for connection types.
|
|
263
|
+
|
|
264
|
+
:class:`~sqlspec.typing.ConnectionT`
|
|
265
|
+
"""
|
|
266
|
+
PoolT = TypeVar("PoolT")
|
|
267
|
+
"""Type variable for pool types.
|
|
268
|
+
|
|
269
|
+
:class:`~sqlspec.typing.PoolT`
|
|
270
|
+
"""
|
|
271
|
+
SchemaT = TypeVar("SchemaT", default=dict[str, Any])
|
|
272
|
+
"""Type variable for schema types (models, TypedDict, dataclasses, etc.).
|
|
273
|
+
|
|
274
|
+
Unbounded TypeVar for use with schema_type parameter in driver methods.
|
|
275
|
+
Supports all schema types including TypedDict which cannot be bounded to a class hierarchy.
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
SupportedSchemaModel: TypeAlias = (
|
|
280
|
+
DictLike | StructStub | BaseModelStub | DataclassProtocol | AttrsInstanceStub | _TypedDict
|
|
281
|
+
)
|
|
282
|
+
"""Type alias for pydantic or msgspec models.
|
|
283
|
+
|
|
284
|
+
:class:`msgspec.Struct` | :class:`pydantic.BaseModel` | :class:`DataclassProtocol` | :class:`AttrsInstance`
|
|
285
|
+
"""
|
|
286
|
+
StatementParameters: TypeAlias = "dict[str, object] | list[object] | tuple[object, ...] | object | None"
|
|
287
|
+
"""Type alias for statement parameters.
|
|
288
|
+
|
|
289
|
+
Represents:
|
|
290
|
+
- :type:`dict[str, object]`
|
|
291
|
+
- :type:`list[object]`
|
|
292
|
+
- :type:`tuple[object, ...]`
|
|
293
|
+
- :type:`object`
|
|
294
|
+
- :type:`None`
|
|
295
|
+
"""
|
|
296
|
+
ArrowReturnFormat: TypeAlias = Literal["table", "reader", "batch", "batches"]
|
|
297
|
+
"""Type alias for Apache Arrow return format options.
|
|
298
|
+
|
|
299
|
+
Represents:
|
|
300
|
+
- :literal:`"table"` - Return PyArrow Table
|
|
301
|
+
- :literal:`"reader"` - Return PyArrow RecordBatchReader
|
|
302
|
+
- :literal:`"batch"` - Return single PyArrow RecordBatch
|
|
303
|
+
- :literal:`"batches"` - Return list of PyArrow RecordBatches
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
@lru_cache(typed=True)
|
|
308
|
+
def get_type_adapter(f: "type[T]") -> Any:
|
|
309
|
+
"""Caches and returns a pydantic type adapter.
|
|
310
|
+
|
|
311
|
+
Args:
|
|
312
|
+
f: Type to create a type adapter for.
|
|
313
|
+
|
|
314
|
+
Returns:
|
|
315
|
+
:class:`pydantic.TypeAdapter`[:class:`typing.TypeVar`[T]]
|
|
316
|
+
"""
|
|
317
|
+
if PYDANTIC_USE_FAILFAST:
|
|
318
|
+
return TypeAdapter(Annotated[f, FailFast()])
|
|
319
|
+
return TypeAdapter(f)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
__all__ = (
|
|
323
|
+
"ALLOYDB_CONNECTOR_INSTALLED",
|
|
324
|
+
"ATTRS_INSTALLED",
|
|
325
|
+
"CATTRS_INSTALLED",
|
|
326
|
+
"CLOUD_SQL_CONNECTOR_INSTALLED",
|
|
327
|
+
"FSSPEC_INSTALLED",
|
|
328
|
+
"LITESTAR_INSTALLED",
|
|
329
|
+
"MSGSPEC_INSTALLED",
|
|
330
|
+
"NANOID_INSTALLED",
|
|
331
|
+
"NUMPY_INSTALLED",
|
|
332
|
+
"OBSTORE_INSTALLED",
|
|
333
|
+
"OPENTELEMETRY_INSTALLED",
|
|
334
|
+
"ORJSON_INSTALLED",
|
|
335
|
+
"PANDAS_INSTALLED",
|
|
336
|
+
"PGVECTOR_INSTALLED",
|
|
337
|
+
"POLARS_INSTALLED",
|
|
338
|
+
"PROMETHEUS_INSTALLED",
|
|
339
|
+
"PYARROW_INSTALLED",
|
|
340
|
+
"PYDANTIC_INSTALLED",
|
|
341
|
+
"PYDANTIC_USE_FAILFAST",
|
|
342
|
+
"UNSET",
|
|
343
|
+
"UUID_UTILS_INSTALLED",
|
|
344
|
+
"ArrowRecordBatch",
|
|
345
|
+
"ArrowRecordBatchReader",
|
|
346
|
+
"ArrowRecordBatchReaderProtocol",
|
|
347
|
+
"ArrowReturnFormat",
|
|
348
|
+
"ArrowSchema",
|
|
349
|
+
"ArrowSchemaProtocol",
|
|
350
|
+
"ArrowTable",
|
|
351
|
+
"AttrsInstance",
|
|
352
|
+
"BaseModel",
|
|
353
|
+
"ColumnMetadata",
|
|
354
|
+
"ConnectionT",
|
|
355
|
+
"Counter",
|
|
356
|
+
"DTOData",
|
|
357
|
+
"DataclassProtocol",
|
|
358
|
+
"DictLike",
|
|
359
|
+
"Empty",
|
|
360
|
+
"EmptyEnum",
|
|
361
|
+
"EmptyType",
|
|
362
|
+
"FailFast",
|
|
363
|
+
"ForeignKeyMetadata",
|
|
364
|
+
"Gauge",
|
|
365
|
+
"Histogram",
|
|
366
|
+
"IndexMetadata",
|
|
367
|
+
"NumpyArray",
|
|
368
|
+
"PandasDataFrame",
|
|
369
|
+
"PolarsDataFrame",
|
|
370
|
+
"PoolT",
|
|
371
|
+
"SchemaT",
|
|
372
|
+
"Span",
|
|
373
|
+
"StatementParameters",
|
|
374
|
+
"Status",
|
|
375
|
+
"StatusCode",
|
|
376
|
+
"Struct",
|
|
377
|
+
"SupportedSchemaModel",
|
|
378
|
+
"TableMetadata",
|
|
379
|
+
"Tracer",
|
|
380
|
+
"TypeAdapter",
|
|
381
|
+
"UnsetType",
|
|
382
|
+
"VersionCacheResult",
|
|
383
|
+
"VersionInfo",
|
|
384
|
+
"attrs_asdict",
|
|
385
|
+
"attrs_define",
|
|
386
|
+
"attrs_field",
|
|
387
|
+
"attrs_fields",
|
|
388
|
+
"attrs_has",
|
|
389
|
+
"cattrs_structure",
|
|
390
|
+
"cattrs_unstructure",
|
|
391
|
+
"convert",
|
|
392
|
+
"get_type_adapter",
|
|
393
|
+
"module_available",
|
|
394
|
+
"trace",
|
|
395
|
+
)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"""Utility functions and classes for SQLSpec.
|
|
2
|
+
|
|
3
|
+
This package provides various utility modules for deprecation handling,
|
|
4
|
+
fixture loading, logging, module loading (including dependency checking),
|
|
5
|
+
portal pattern for async bridging, singleton patterns, sync/async conversion,
|
|
6
|
+
text processing, and type guards.
|
|
7
|
+
"""
|