SODA: collection management + SodaDatabase foundation (#199)#204
Merged
Conversation
First step of the #163 SODA umbrella. python-oracledb only does SODA in thick mode (DPY-3001), so there is no native thin wire to speak; the thin path is the database's DBMS_SODA PL/SQL package, which pyoracle already drives. This builds the oracledb-shaped entry points on top of it. - connection.getSodaDatabase() / aconnection.getSodaDatabase() -> a (Async)SodaDatabase, gated to Oracle 18c+ (DBMS_SODA) with NotSupportedError below. - SodaDatabase.createCollection(name, metadata=None) / openCollection (None when absent) / getCollectionNames(startName, limit). - SodaCollection: .name, .metadata, .drop() -> bool, .truncate(). - New oracle/soda.py holds both the sync and async classes (shared DBMS_SODA PL/SQL templates); collection names come from USER_SODA_COLLECTIONS. Surface RE'd against 23ai: open_collection returns NULL when missing, drop_collection / truncate are functions (assign the result). Tests: offline (the 18c+ gate, the names-query builder, metadata normalisation) plus live collection round-trips sync+async, gated 18c+ — 23ai/21c pass, 11g/9i skip. Documents / QBE / updates follow in #200-#202. Closes #199 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Peter Lemenkov <lemenkov@gmail.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.
First step of the #163 SODA umbrella (the collection-management foundation).
Approach — python-oracledb only does SODA in thick mode (DPY-3001), so there's no native thin wire to RE; the thin path is the database's
DBMS_SODAPL/SQL package, which pyoracle already drives. This adds the oracledb-shaped Python entry points on top.API (sync + async, gated to Oracle 18c+):
connection.getSodaDatabase()→SodaDatabase(NotSupportedErrorbelow 18c)SodaDatabase.createCollection(name, metadata=None)/openCollection(name)(→Nonewhen absent) /getCollectionNames(startName, limit)SodaCollection:.name,.metadata,.drop()→ bool,.truncate()oracle/soda.pyholds both sync and async classes over sharedDBMS_SODAPL/SQL templates; collection names come fromUSER_SODA_COLLECTIONS.RE notes (against 23ai):
open_collectionreturns NULL when missing;drop_collectionand the collectiontruncateare functions (assign the result), not procedures.Tests: offline (the 18c+ gate, the names-query builder, metadata normalisation) + live collection round-trips sync+async, gated 18c+ — 23ai/21c pass, 11g/9i skip. Offline suite 522 green.
Documents / QBE / updates follow in #200–#202.
Closes #199
🤖 Generated with Claude Code