Skip to content

SODA: collection management + SodaDatabase foundation (#199)#204

Merged
lemenkov merged 1 commit into
masterfrom
soda-1-collections-199
Jun 25, 2026
Merged

SODA: collection management + SodaDatabase foundation (#199)#204
lemenkov merged 1 commit into
masterfrom
soda-1-collections-199

Conversation

@lemenkov

Copy link
Copy Markdown
Owner

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_SODA PL/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 (NotSupportedError below 18c)
  • SodaDatabase.createCollection(name, metadata=None) / openCollection(name) (→ None when absent) / getCollectionNames(startName, limit)
  • SodaCollection: .name, .metadata, .drop() → bool, .truncate()
  • New oracle/soda.py holds both sync and async classes over shared DBMS_SODA PL/SQL templates; collection names come from USER_SODA_COLLECTIONS.

RE notes (against 23ai): open_collection returns NULL when missing; drop_collection and the collection truncate are 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

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>
@lemenkov lemenkov added this to the 1.10.0 milestone Jun 25, 2026
@lemenkov lemenkov merged commit d5d0b12 into master Jun 25, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SODA: collection management + SodaDatabase foundation

1 participant