Skip to content

LOB.getchunksize() not supported in thin mode #14

@doerwalter

Description

@doerwalter

The following Python script

import oracledb

db = oracledb.connect("user/pwd@db", config_dir=os.environ["ORACLE_HOME"] + "/network/admin")
lob = db.cursor().execute("select to_clob('foo') from dual").fetchone()[0]
lob.getchunksize()

gives the following stacktrace:

Traceback (most recent call last):
  File "/Users/walter/oracledb_bug.py", line 6, in <module>
    lob.getchunksize()
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/lob.py", line 75, in getchunksize
    return self._impl.get_chunk_size()
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/utils.py", line 51, in wrapped_f
    errors._raise_err(errors.ERR_FEATURE_NOT_SUPPORTED,
  File "/Users/walter/pyvenvs/default/lib/python3.10/site-packages/oracledb/errors.py", line 103, in _raise_err
    raise exc_type(_Error(message)) from cause
oracledb.exceptions.NotSupportedError: DPY-3001: getting the chunk size of a LOB is only supported in python-oracledb thick mode

The documentation for getchunksize() states:

Returns the chunk size for the internal LOB. Reading and writing to the LOB in chunks of multiples of this size will improve performance.

Is there even something like an "optmal chunk size" in thin mode? If this isn't relevant for thin mode the documentation (and/or the exception message?) should suggest which chunk size should be used for reading a LOB.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions