JavaScript API for Oracle type Binary Large Object (BLOB).

Hierarchy

  • OracleBlob

Constructors

Properties

LOB_READONLY: number = OracleBlobImpl.LOB_READONLY

Constant for read-only mode.

LOB_READWRITE: number = OracleBlobImpl.LOB_READWRITE

Constant for read/write mode.

Methods

  • This method closes a previously opened BLOB.

    Parameters

    • Rest ...args: any[]

    Returns void

  • This method frees the temporary BLOB in the default temporary tablespace.

    Parameters

    • Rest ...args: any[]

    Returns void

  • When creating the table, you can specify the chunking factor, a multiple of tablespace blocks in bytes. This corresponds to the chunk size used by the BLOB data layer when accessing or modifying the BLOB value. Part of the chunk is used to store system-related information, and the rest stores the BLOB value. This method returns the amount of space used in the BLOB chunk to store the BLOB value.

    Parameters

    • Rest ...args: any[]

    Returns number

  • Returns all the BLOB data as Uint8Array.

    For queries returning LOB columns, it can be more efficient to use fetchAsUint8Array, or fetchInfo instead of lob.getData().

    Throws

    Error if blob is too large.

    Returns Uint8Array

  • Returns any

  • This method checks to see if the BLOB was already opened using the input locator.

    Parameters

    • Rest ...args: any[]

    Returns boolean

  • Returns boolean

  • This method determines whether a BLOB instance is temporary.

    Parameters

    • Rest ...args: any[]

    Returns boolean

  • This method gets the length of the specified BLOB. The length in bytes is returned.

    Parameters

    • Rest ...args: any[]

    Returns number

  • This method opens a BLOB in the indicated mode. Valid modes include read-only, and read/write.

    Parameters

    • mode: number

    Returns void

  • This method reads a piece of a BLOB, and returns the specified amount into the buffer parameter, starting from an absolute offset from the beginning of the BLOB. If the input offset points past the End of BLOB, a NO_DATA_FOUND exception is raised.

    Returns

    a Uint8Array that contains the bytes actually read.

    Parameters

    • amount: number

      Number of bytes to read.

    • offset: number

      Offset in bytes from the start of the BLOB (origin: 1).

    Returns Uint8Array

  • This method writes data into an internal BLOB, starting from an absolute offset from the beginning of the BLOB. The data is written from the buffer parameter. WRITE replaces (overwrites) any data that already exists in the BLOB at the offset.

    Parameters

    • offset: number

      Offset in bytes from the start of the BLOB (origin: 1) for the write operation.

    • buffer: Uint8Array

      Data to write.

    Returns void

  • This method compares two entire BLOBs or parts of two BLOBs.

    Returns

    0 if the compared portions are equal, non-zero if not

    Throws

    Error if offset1 or offset2 is not a valid BLOB offset value.

    Parameters

    Returns number

  • This constructor creates a temporary BLOB and its corresponding index in your default temporary tablespace. The temporary BLOB is created with SESSION duration.

    Parameters

    • cache: boolean

      Specified if BLOB should be read into buffer cache or not.

    Returns OracleBlob