Skip to content

Ask the driver for LOB values, not LOB objects - #15

Merged
lemenkov merged 1 commit into
masterfrom
fetch-lob-values
Sep 19, 2026
Merged

lemenkov merged 1 commit into
masterfrom
fetch-lob-values

Conversation

@lemenkov

Copy link
Copy Markdown
Member

seerdb 3.0 returns a LOB object from a SELECT of a CLOB / BLOB by default, matching python-oracledb (seerdb#964). This dialect is built on the values: SQLAlchemy's Text and LargeBinary result processors, and every comparison the compliance suite makes, expect str / bytes.

Measured three ways, on 11g

combination result
dialect master + driver master 52 failed, 945 passed
dialect master + driver with the flip 65 failed, 932 passed
this branch + driver with the flip 52 failed, 945 passed

The baseline is restored exactly — 13 regressions recovered, none left over. (The 52 are this local bed's own pre-existing failures, unrelated to LOBs.)

Why feature-detected rather than pinned

The same dialect still has to work against a driver that predates the option — passing fetch_lobs to one is a TypeError — and the floor cannot be raised to a driver release that is not published yet. seerdb.OracleConnect is public, so one signature probe at import settles it.

A URL that asks for ?fetch_lobs=true still wins: the query-string loop runs after this, exactly as it does for autocommit.

Note for the driver side

seerdb's SQLAlchemy compliance (Mirror over PostgreSQL) job checks this repository out at master, so it goes green once this merges. The 11g and 23ai jobs check out the newest release tag, so they stay red until the dialect is tagged — that is a release call, not something this PR can do.

🤖 Generated with Claude Code

seerdb 3.0 returns a LOB OBJECT from a SELECT of a CLOB / BLOB by
default, matching python-oracledb (seerdb#964). This dialect is built on
the values: SQLAlchemy's Text and LargeBinary result processors, and
every comparison the compliance suite makes, expect str / bytes.

Without this, against a driver carrying that change, the compliance suite
goes 52 failed -> 65 (the 52 are this bed's own pre-existing failures).
With it, 52 again -- the baseline restored exactly, measured three ways
on 11g:

    dialect master + driver master          52 failed, 945 passed
    dialect master + driver with the flip   65 failed, 932 passed
    dialect HERE   + driver with the flip   52 failed, 945 passed

`fetch_lobs` is FEATURE-DETECTED rather than pinned. The same dialect
still has to work against a driver that predates the option -- passing it
to one is a TypeError -- and the floor cannot be raised to a driver
release that is not published yet. `seerdb.OracleConnect` is public, so
one signature probe at import settles it.

A URL that asks for `?fetch_lobs=true` still wins: the query-string loop
runs after this, as it does for autocommit.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@lemenkov
lemenkov merged commit d32eeae into master Sep 19, 2026
15 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.

1 participant