JavaScript API for Oracle type Character Large Object (CLOB).

Hierarchy

  • IOracleClob

Constructors

Properties

LOB_READONLY: number

Constant for read-only mode.

LOB_READWRITE: number

Constant for read/write mode.

Methods

  • This method closes a previously opened CLOB.

    Returns any

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

    Returns

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

    Throws

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

    Parameters

    Returns number

  • createTemporary creates a temporary CLOB and its corresponding index in your default temporary tablespace. The temporary CLOB is created with SESSION duration.

    Parameters

    • cache: boolean

      Specifies if CLOB should be read into buffer cache or not.

    • Optional isNClob: boolean

      If set to true will create a temporary NCLOB instead of regular CLOB.

    Returns any

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

    Returns any

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

    Returns number

  • Returns all the CLOB/NCLOB data as string.

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

    Returns string

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

    Returns boolean

  • This method determines whether a CLOB instance is temporary.

    Returns boolean

  • This method gets the length of the specified CLOB. The length in characters is returned.

    Returns number

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

    Parameters

    • mode: number

    Returns any

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

    Returns

    a string that contains the characters actually read.

    Parameters

    • amount: number

      Number of characters to read.

    • offset: number

      Offset in characters from the start of the CLOB (origin: 1).

    Returns string

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

    Parameters

    • offset: number

      Offset in characters from the start of the CLOB (origin: 1) for the write operation.

    • buffer: string

      Data to write.

    Returns any