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

ora-lob-write-from-plain-file Function

Summary

Writes the contents of a file into a LOB.

Package

sql

Signature

ora-lob-write-from-plain-file lob-locator file-name &key offset file-offset if-does-not-exist

Arguments
lob-locator
A LOB locator.
file-name
A pathname designator.
offset
A non-negative integer, or nil.
file-offset
A non-negative integer, or nil.
if-does-not-exist
A keyword or nil.
Description

The function ora-lob-write-from-plain-file writes the contents of a file into lob-locator.

file-name specifies the file to read, which should be a standard file. The file is always opened in a binary mode, so if the LOB is a CLOB, the file must be in the right format when writing it into the LOB.

offset is the offset into the LOB from where to start writing. It starts from 1, counts characters in a CLOB, and if it is nil then the operation starts from the end of the previous write operation. The default value of offset is nil.

file-offset specifies the offset into the file to start the operation from. If file-offset is nil then it starts reading at the start of the file. The default value of file-offset is nil.

if-does-not-exist is passed to open when opening the file, with the standard Common Lisp meaning. The default value of if-does-not-exist is :error.

Notes

ora-lob-write-from-plain-file is available only when the "oracle" module is loaded. See the section 23.11 Oracle LOB interface for more information.

See also

ora-lob-read-into-plain-file


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56