To add a new LOB object to the database, you must insert an empty LOB. The preferred way of doing this is to use the Oracle SQL functions EMPTY_BLOB and EMPTY_CLOB, which can called by using the pseudo operator
sql-function
, like this:
(sql:insert-records :into [mytable]
:values
(list "name" [sql-function 'empty_blob]))
This code inserts a record with "name" and an empty BLOB. It is also possible to make an empty LOB by calling
ora-lob-create-empty
, and passing the empty LOB as a value to
insert-records
or
update-records
.