Class: OCI8::BLOB

Inherits:
LOB show all
Defined in:
ext/oci8/lob.c,
ext/oci8/lob.c

Overview

This class is a ruby-side class of Oracle BLOB datatype.

Instance Method Summary collapse

Methods inherited from LOB

#available?, #chunk_size, #close, #eof?, #pos, #read, #rewind, #seek, #size, #size=, #truncate, #write

Constructor Details

#initialize(conn, contents = nil) ⇒ OCI8::BLOB

Creates a temporary BLOB when contents is not nil. Otherwise, it creates an uninitialized lob, which is used internally to fetch BLOB column data.

Examples:

# Inserts a file name and its contents as BLOB.
clob = OCI8::BLOB.new(conn, File.read(file_name, :mode => 'rb'))
conn.exec('insert into file_contents values (:1, :2)', file_name, clob)

Parameters:



445
446
447
448
449
# File 'ext/oci8/lob.c', line 445

static VALUE oci8_blob_initialize(int argc, VALUE *argv, VALUE self)
{
    oci8_lob_do_initialize(argc, argv, self, SQLCS_IMPLICIT, OCI_TEMP_BLOB);
    return Qnil;
}