One way of reading and writing is to use streams as described in the section Retrieving LOB Locators as streams. When large amounts of data are written (read) to (from) the LOB the direct interface may be useful. The direct interface is implemented by
ora-lob-read-foreign-buffer
,
ora-lob-read-buffer
,
ora-lob-write-foreign-buffer
, and
ora-lob-write-buffer
.
All the direct interfaces are more efficient if the buffer that is passed is static. That is always true for the
*-foreign-buffer
functions, but normally not true for Lisp objects. See the documentation for
make-array
in the
LispWorks Reference Manual
. See also
ora-lob-get-buffer
.
The direct reading and writing methods can be used for "random" access, but they can also be used conveniently for efficient linear access, simply by passing
nil
as the
offset
parameter.