LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XClob Interface Referencepublished

is the mapping for the SQL `CLOB` type. More...

`import"XClob.idl";`

Inheritance diagram for XClob:

## Public Member Functions
hyper | length () raises (SQLException)
| returns the number of characters in the `CLOB` value designated by this `Clob` object. More...
string | getSubString ([in]hyper pos, [in]long length) raises (SQLException)
| returns a copy of the specified substring in the `Clob` value designated by this `Clob` object. More...
com::sun::star::io::XInputStream | getCharacterStream () raises (SQLException)
| gets the `Clob` contents as a stream. More...
hyper | position ([in]string searchstr, [in]long start) raises (SQLException)
| determines the character position at which the specified substring `searchstr` appears in the `Clob`. More...
hyper | positionOfClob ([in]XClob pattern, [in]hyper start) raises (SQLException)
| determines the position at which the specified `Clob` object `pattern` appears in this `Clob` object. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

is the mapping for the SQL `CLOB` type.

A SQL `CLOB` is a built-in type that stores a Character Large Object as a column value in a row of a database table. The driver implements a `Clob` object using a SQL `locator(CLOB)` , which means that a `Clob` object contains a logical pointer to the SQL `CLOB` data rather than the data itself. A `Clob` object is valid for the duration of the transaction in which it was created.

The `Clob` interface provides methods for getting the length of a SQL `CLOB` (Character Large Object) value, for materializing a `CLOB` value on the client, and for searching for a substring or `CLOB` object within a `CLOB` value.

Methods in the interfaces com::sun::star::sdbc::XResultSet , and com::sun::star::sdbc::XPreparedStatement , such as `getClob` and `setClob` allow a programmer to access the SQL `CLOB`.

## Member Function Documentation

## ◆ getCharacterStream()

com::sun::star::io::XInputStream getCharacterStream | ( |  | ) |
raises | ( | SQLException
| ) |  |

gets the `Clob` contents as a stream.

Returns
  the stream

Exceptions

  SQLException | if a database access error occurs.

## ◆ getSubString()

string getSubString | ( | [in] hyper | pos,
|  | [in] long | length
| ) |  |
raises | ( | SQLException
| ) |  |

returns a copy of the specified substring in the `Clob` value designated by this `Clob` object.

The substring begins at position `pos` and has up to `length` consecutive characters.

Parameters

  pos | the starting position, 1-based
  length | the length of the substring

Returns
  the substring

Exceptions

  SQLException | if a database access error occurs.

## ◆ length()

hyper length | ( |  | ) |
raises | ( | SQLException
| ) |  |

returns the number of characters in the `CLOB` value designated by this `Clob` object.

Returns
  the length of the CLOB object

Exceptions

  SQLException | if a database access error occurs.

## ◆ position()

hyper position | ( | [in] string | searchstr,
|  | [in] long | start
| ) |  |
raises | ( | SQLException
| ) |  |

determines the character position at which the specified substring `searchstr` appears in the `Clob`.

The search begins at position `start`.

Parameters

  searchstr | the string to search
  start | the starting position

Returns
  the length of the CLOB object

Exceptions

  SQLException | if a database access error occurs.

## ◆ positionOfClob()

hyper positionOfClob | ( | [in] XClob | pattern,
|  | [in] hyper | start
| ) |  |
raises | ( | SQLException
| ) |  |

determines the position at which the specified `Clob` object `pattern` appears in this `Clob` object.

The search begins at position `start`.

Parameters

  pattern | the CLOB to search
  start | the starting position

Returns
  the position of the CLOB inside

Exceptions

  SQLException | if a database access error occurs.

The documentation for this interface was generated from the following file:

- com/sun/star/sdbc/XClob.idl