Skip to content

Add LOB support - #139

Open
Vnajeb wants to merge 6 commits into
mainfrom
feature/LOB-support
Open

Add LOB support#139
Vnajeb wants to merge 6 commits into
mainfrom
feature/LOB-support

Conversation

@Vnajeb

@Vnajeb Vnajeb commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Resolves #88

Changes proposed in this pull request:

  • LOB columns previously came back as raw, unwrapped values. CLOB, NCLOB, DBCLOB, and BLOB column values are now wrapped in new ClobValue/BlobValue objects in lob.py that expose a PEP 249-style read() method, matching DB-API 2.0.
  • Wrapping now happens automatically for every row. row_to_tuple inspects each column's SQL type and wraps LOB values on the way out, so callers get ClobValue/BlobValue instances without any extra opt-in.
  • Terse-mode rows were silently missing this wrapping. cursor.execute(sql, isTerseResults=True) used to return raw CLOB/BLOB values in list rows since the old code only handled dicts it now wraps list rows the same way, so both row shapes behave consistently.
  • Backed by 56 new/updated unit tests. tests/unit/test_lob.py covers ClobValue/BlobValue construction, read() chunking/exhaustion, and NULL handling, while tests/unit/test_cursor_pep249.py adds end-to-end coverage through Cursor.execute/fetchone/fetchall, including the terse-mode regression case.

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.

LOB support in python

1 participant