Commit Graph

9 Commits

Author SHA1 Message Date
Orthel Toralen
80717b9e0a chore: add guard for unsupported sqlalchemy versions 2026-07-10 23:52:59 -04:00
Orthel Toralen
ab63f06384 refactor/docs: moved class meathods that were duplicated for each dialect into the _TursoDialectMixin class. Updated SQLALCHEMY_DIALECT.md to clarify isolation_level paramater reference, consolidated repetive sync examples. 2026-07-10 23:52:59 -04:00
Orthel Toralen
6eb593063d docs: minor rewording to make doc strings clearer and more concise 2026-07-10 23:52:59 -04:00
Orthel Toralen
345f72fd59 refactor: remove table reflection exclusions for sqlite features now supported by Turso 2026-07-10 23:52:59 -04:00
Akira Noda
3c7fd2a94f bindings/python: Add SQLAlchemy asyncio dialect 2026-04-24 13:15:14 +09:00
Orthel Toralen
dd160749f9 docs: update SQLALCHEMY_DIALECT.md to include some missing items 2026-02-25 00:18:06 -05:00
Orthel Toralen
9ca8d67694 python: fix SQLAlchemy dialect table reflection for unsupported PRAGMAs
Turso doesn't support PRAGMA foreign_key_list and PRAGMA index_list,
which SQLAlchemy uses for table reflection. This caused errors when
using Pandas df.to_sql() with if_exists='replace'.

Add _TursoDialectMixin that overrides reflection methods to return
empty results instead of executing unsupported PRAGMAs:
- get_foreign_keys() / get_multi_foreign_keys()
- get_indexes() / get_multi_indexes()
- get_unique_constraints() / get_multi_unique_constraints()
- get_check_constraints() / get_multi_check_constraints()

Foreign keys and indexes still work at runtime, they just can't be
introspected through SQLAlchemy's inspector.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 00:18:06 -05:00
Orthel Toralen
2456098213 python: add SQLAlchemy dialect for pyturso
Implement SQLAlchemy integration with two dialects:
- sqlite+turso:// for basic local database connections
- sqlite+turso_sync:// for sync-enabled connections with remote support

The dialects extend SQLiteDialect_pysqlite and provide:
- URL parsing for connection arguments
- get_sync_connection() helper for accessing pull/push/checkpoint/stats
- Statement caching support
- Proper isolation level handling

Also adds sqlite_version and sqlite_version_info to turso module
for SQLAlchemy compatibility checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 00:18:06 -05:00
Orthel Toralen
9a7dcc9607 docs: Documented SQLAlchemy driver research. 2026-02-25 00:17:36 -05:00