A LOB locator.
A generalized boolean.
A non-negative integer or
A non-negative integer.
A FLI pointer.
A boolean or an error object.
If for-writing is
ora-lob-get-buffer fills an internal buffer and returns three values: amount/size is how much it filled, foreign-buffer points to the actual buffer, and eof-or-error-p is the return value from the call to ora-lob-read-foreign-buffer. The offset offset is passed directly ora-lob-read-foreign-buffer.
If for-writing is true, then
ora-lob-get-buffer returns two values: amount/size is the size of the foreign buffer and foreign-buffer points to the actual buffer, which then can be passed to ora-lob-write-foreign-buffer.
The buffer that is used by
ora-lob-get-buffer is always the same for the LOB locator, it is used by ora-lob-read-buffer and ora-lob-write-buffer, and is freed automatically when the LOB locator is freed. Thus until you finish with the buffer, you cannot use ora-lob-read-buffer or ora-lob-write-buffer or call ora-lob-get-buffer again or free the LOB locator.
ora-lob-get-buffer is available only when the "oracle" module is loaded. See the section Oracle LOB interface for more information.
my_chunk_processor(char *data, int size)
This second example illustrates writing with the buffer obtained by
ora-lob-get-buffer. You have a foreign function that fills a buffer with data, and you want to write it to a LOB. First you should lock the record, and if required trim the LOB locator.
LispWorks User Guide and Reference Manual - 13 Feb 2015