All Manuals > LispWorks User Guide and Reference Manual > 47 The SQL Package

NextPrevUpTopContentsIndex

ora-lob-copy

Function
Summary

Copies part of an internal LOB.

Package

sql

Signature

ora-lob-copy dest-lob-locator src-lob-locator amount &key dest-offset src-offset errorp

Arguments

dest-lob-locator

A LOB locator.

src-lob-locator

A LOB locator.

amount

A non-negative integer.

dest-offset

A non-negative integer.

src-offset

A non-negative integer.

errorp

A generalized boolean.

Description

The function ora-lob-copy copies part of the LOB pointed to by src-lob-locator into the LOB pointed to by dest-lob-locator.

The details of the operation are determined by amount, src-offset and dest-offset. These numbers are in characters for CLOB/NCLOB and bytes for BLOB, and the offsets start from 1. The part of the source LOB from offset src-offset of length amount is copied into the destination LOB at offset dest-offset. The default value of dest-offset is 1 and the default value of src-offset is 1.

The destination LOB is extended if needed. If the dest-offset is beyond the end of the destination LOB, the gap between the end and dest-offset is erased, that is, filled with 0 for BLOBs or spaces for CLOBs.

Both LOBs must be internal LOBs, and they must be of the same type, that is, either both BLOB or both CLOB/NCLOB.

ora-lob-append is applicable to internal LOBs only.

If an error occurs and errorp is true, an error is signaled. If errorp is false, the function returns an object of type sql-database-error. The default value of errorp is nil.

Notes
  1. This is a direct call OCILobCopy.
  2. This function is available only when the "oracle" module is loaded. See the section Oracle LOB interface for more information.
See also

ora-lob-load-from-file


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex