fix: backend-agnostic improvements for multi-backend SQL support#2
Open
kushalbakshi wants to merge 1 commit intomasterfrom
Open
fix: backend-agnostic improvements for multi-backend SQL support#2kushalbakshi wants to merge 1 commit intomasterfrom
kushalbakshi wants to merge 1 commit intomasterfrom
Conversation
f848623 to
520e2b5
Compare
Improves DataJoint's adapter abstraction to properly support non-MySQL backends. These changes benefit PostgreSQL and enable third-party adapter registration. Changes: - Add make_full_table_name() to adapter ABC — centralizes table name construction (was hardcoded in 5 files) - Add foreign_key_action_clause property — FK referential actions via adapter (was hardcoded in declare.py) - Use fetchone() instead of rowcount for existence checks — DBAPI2 does not guarantee rowcount for non-DML statements (table.py, schemas.py) - Guard transaction methods against empty SQL — supports backends without multi-table transactions (connection.py) - Use adapter.quote_identifier() for job metadata columns — fixes PostgreSQL which uses double-quotes (autopopulate.py) - Use adapter.split_full_table_name() for name parsing — backend- agnostic instead of manual split (declare.py) - Route lineage table check through adapter — catalog-qualified queries for backends with namespaced information_schema (lineage.py) - Add "bytes"/"binary" to blob type detection list — supports backends that use BINARY instead of longblob (codecs.py) - Extend backend Literal to accept third-party adapter names (settings.py) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
520e2b5 to
6dc5d4f
Compare
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.
Improves DataJoint's adapter abstraction to properly support non-MySQL backends. These changes benefit PostgreSQL and enable third-party adapter registration.
Changes: