Repository navigation
feat(adapters): add sybase ase and sap sql anywhere dialects, data dictionaries, and adapters - #870
Merged
Merged
Conversation
…spanner adk artifact suites
…nd mariadb 11.8 suites
…elf-signed wallets
…arding - register integration database plugins dynamically inside pytest_configure - update DuckDB sequence resynchronization to use CTE and schema-qualified range calculation - add shared apply_wallet_ssl_context helper for OracleDB with config_dir fallback and unit tests - rewrite Db2 ADBC non-query statement classification using public SQL statement properties - clean up TypedDict docstrings for AlloyDB columnar scan and drop unsupported psqlpy pool param - decouple ODBC DSN assertion from pinning SQLite fallback - centralize module resolution in tests/fixtures/modules.py across test conftests - separate collection hook tests into test_collection_groups.py and remove legacy test path guards - rename MySQL ADK residual test suite to test_adk_store.py and narrow FK integrity check - update Makefile integration and coverage targets to execute database shards sequentially - adjust CI integration job timeout to 45 minutes with a 35-minute watchdog - upgrade dependencies via make upgrade and point pytest-databases to test/clientless-all branch
cofin
marked this pull request as ready for review
October 31, 2026 00:53
cofin
force-pushed
the
research_sybase_adbc_driver
branch
from
October 31, 2026 01:53
a2f4074 to
3f9c0f7
Compare
cofin
changed the base branch from
main
to
pytest_databases_clientless_research
October 31, 2026 01:54
…straint check - update test_mysql_adk_owner_id_fk_constraint_isolation_and_cascade to catch driver IntegrityError exceptions - fix frozenset set difference typing in postgres and cockroach data dictionaries
cofin
force-pushed
the
pytest_databases_clientless_research
branch
from
October 31, 2026 02:14
49c05ab to
7945fc6
Compare
…path optimizations
… fixture identity resync
…yc and import gates
…d migrations - add sybase and sqlanywhere sequence and identity resync support to fixtures - support replaces argument in sybase and sqlanywhere migration trackers - exclude lob types from export order by clause
… for canonical column metadata
…, and driver configs
cofin
force-pushed
the
research_sybase_adbc_driver
branch
from
October 31, 2026 02:19
3f9c0f7 to
74fc6be
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #870 +/- ##
==========================================
- Coverage 80.67% 80.57% -0.11%
==========================================
Files 527 563 +36
Lines 95524 99315 +3791
Branches 18704 19155 +451
==========================================
+ Hits 77066 80023 +2957
- Misses 13582 14294 +712
- Partials 4876 4998 +122
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: Cody Fincher <204685+cofin@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class SQLGlot dialects, system catalog data dictionaries, database adapters, migration trackers, and framework/AI extension stores (Litestar, Events, and Google ADK) for both SAP Adaptive Server Enterprise (
sybase) overpymssql(FreeTDS TDS5.0) and SAP SQL Anywhere (sqlanywhere) oversqlanydb.Key Changes
Custom SQLGlot Dialects & Query Builder (
sqlspec.dialects.sybase,sqlspec.builder)Sybase(sqlspec.dialects.sybase:Sybase) andSQLAnywhere(sqlspec.dialects.sybase:SQLAnywhere) custom SQLGlot dialects registered under[project.entry-points."sqlglot.dialects"]and exported fromsqlspec.dialects.sybase_dispatch,sqlanywhere_dispatch) insqlspec/dialects/sybase/_generators.pysosqlglot[c]compiled generators are never subclassed directly andTSQLGenerator.TRANSFORMSis never mutated for"tsql"/"mssql"callers.clone_with_detached_pagination) insybase_select_sql,sybase_set_operation_sql,sqlanywhere_select_sql, andsqlanywhere_set_operation_sqlsoexpression.sql(dialect=..., copy=False)on shared or cached ASTs never stripsLIMIT/OFFSETin place.NORMALIZATION_STRATEGY = NormalizationStrategy.CASE_SENSITIVEonSybaseandSQLAnywheresoQueryBuilder._optimize_expression()resolves single-tableMappingSchema(..., normalize=False)on the first pass and populatesQueryCache.ROWS LIMIT <limit> OFFSET <offset>andSELECT TOP <n>pagination rendering/parsing,TEXT/UNITEXT/IMAGE/BIGDATETIME/BIGTIME/VARCHAR(36)type mappings,IDENTITYwithout seed/increment arguments,GETUTCDATE(),CHAR_LENGTH(),CHARINDEX(), andLOWER(a) LIKE LOWER(b).LIMIT <limit> [OFFSET <offset>]and Watcom-SQLSELECT TOP <n> START AT <m>parsing (converting 1-basedSTART ATto 0-basedOFFSET),LONG VARCHAR/LONG NVARCHAR/LONG BINARY/TIMESTAMP/TIMESTAMP WITH TIME ZONE/UNIQUEIDENTIFIER/BITtype mappings,CURRENT UTC TIMESTAMP, and nativeCREATE TABLE IF NOT EXISTS/DROP TABLE IF EXISTS._normalize_dialectinsqlspec/builder/_parsing_utils.pyto normalize"sybase"/"ase"/"sybase_ase"to"sybase"and"sqlanywhere"/"sql_anywhere"/"sa"to"sqlanywhere"."sybase"toMERGE_UNSUPPORTED_DIALECTSinsqlspec/builder/_merge.py.System Catalog Data Dictionaries & Fixtures (
sqlspec.data_dictionary,sqlspec.utils.fixtures)SYBASE_CONFIGand 9 catalog SQL queries undersqlspec/data_dictionary/dialects/sybase/introspectingdbo.sysobjects,dbo.syscolumns,dbo.systypes,dbo.sysindexes,dbo.sysreferences,dbo.sysusers, anddbo.syscomments.SQLANYWHERE_CONFIGand 9 catalog SQL queries undersqlspec/data_dictionary/dialects/sqlanywhere/introspectingSYS.SYSTAB,SYS.SYSTABCOL,SYS.SYSDOMAIN,SYS.SYSIDX,SYS.SYSIDXCOL,SYS.SYSFKEY,SYS.SYSUSER, andSYS.SYSVIEW.sqlspec/utils/fixtures.pyto resynchronize Sybase ASE identity columns viaEXEC sp_chgattribute '<table>', 'identity_burn_max', 0, '<max>'and SQL Anywhere identity columns viaCALL sa_reset_identity('<table>', '<schema>', <max>), exclude LOB types (text,unitext,image,long varchar,long nvarchar,long binary) from export ordering, and decodebigdatetime,smalldatetime,datetimetz,bigtime,money,smallmoney, anduniqueidentifiercolumns.SAP ASE Adapter (
sqlspec.adapters.sybase)SybaseConfig,SybaseDriver,SybaseConnectionPool,SybaseCursor,SybaseExceptionHandler,SybaseSyncDataDictionary, andSybaseSyncMigrationTracker.TDSVER="5.0"environment negotiation inSybaseConnectionPool.new_connection()so FreeTDSlibsybdbtransmits a native TDS5.0login packet without triggeringpymssql._mssql's Cythontds_versionvalidator, paired with Sybase-safeDEFAULT_SYBASE_CONN_PROPERTIES(SET QUOTED_IDENTIFIER ON; SET ANSINULL ON; SET TEXTSIZE 2147483647;) andautocommit=True(supports_transactional_ddl = False, avoiding ASE Error2762).2601/2627,546/547,233/515,548,1205,12205,102/156/11021,207/208,4002/18456/20002,20047/2762/1105,247/220/168/3606,10330/10331/10332) to canonicalsqlspec.exceptions.SybaseStore(sqlspec.adapters.sybase.litestar),SybaseSyncEventQueueStore(sqlspec.adapters.sybase.events), andSybaseADKStore/SybaseADKMemoryStore(sqlspec.adapters.sybase.adk).SAP SQL Anywhere Adapter (
sqlspec.adapters.sqlanywhere)SqlanywhereConfig,SqlanywhereDriver,SqlanywhereConnectionPool,SqlanywhereCursor,SqlanywhereExceptionHandler,SqlanywhereSyncDataDictionary, andSqlanywhereSyncMigrationTrackeroversqlanydb(ParameterStyle.QMARK).user/username,password,database,server/engine,database_file,host+port) tosqlanydb.connectkeywords (uid,pwd,dbn,eng,dbf,host="host:port"with default port2638).-193/-196,-194/-198,-195,-209/-1091,-210/-306/-307/-684,-131,-141/-143,-100/-103/-832,-157/-158,-121) exception mapping.SqlanywhereStore(sqlspec.adapters.sqlanywhere.litestar),SqlanywhereSyncEventQueueStore(sqlspec.adapters.sqlanywhere.events), andSqlanywhereADKStore/SqlanywhereADKMemoryStore(sqlspec.adapters.sqlanywhere.adk).Packaging & MyPyC Compilation (
pyproject.toml,tools/scripts/)sybase = ["pymssql"]andsqlanywhere = ["sqlanydb>=1.0.14"]optional dependency extras and pytest markers inpyproject.toml.sqlspec/dialects/sybase/{_generators,_parsers,_transforms}.py,sqlspec/data_dictionary/dialects/{sybase,sqlanywhere}/config.py, andsqlspec/adapters/{sybase,sqlanywhere}/{core,pool}.pyin the MyPyC compiled surface (pyproject.toml,tools/scripts/mypyc_inventory.py,tools/scripts/mypyc_smoke.py).