LibreOffice: ResultSet Service Reference

LibreOffice LibreOffice 7.5 SDK API Reference

Loading...
Searching...
No Matches
Exported Interfaces | Public Attributes | List of all members
ResultSet Service Referencepublished

provides access to a table of data. More...

Inheritance diagram for ResultSet:

## Exported Interfaces
interface | com::sun::star::lang::XComponent
| optional for implementation; controls the releasing of resources and the notification of registered listeners.
interface | XCloseable
| freeing all resources of a result set.
interface | com::sun::star::beans::XPropertySet
interface | XWarningsSupplier
| controls the chaining of warnings, which may occur on every call to the connected database.
interface | XResultSetMetaDataSupplier
| provides the access to the result set description.
interface | XResultSet
| is the interface for navigating on the rows on a result set.
interface | XResultSetUpdate
| is the interface for updating row data to the database.
interface | XRow
| is the interface for accessing the data of the current row.
interface | XColumnLocate
| is used for locating a column by its name.
interface | XRowUpdate
| is the interface for updating the data of the current row.

## Public Attributes
string | CursorName
| defines the SQL cursor name that will be used by subsequent Statement `execute` methods.
long | ResultSetConcurrency
| retrieves the result set concurrency.
long | ResultSetType
| determines the result set type.
long | FetchDirection
| retrieves the direction for fetching rows from database tables that is the default for result sets generated from this com::sun::star::sdbcx::Statement object.
long | FetchSize
| retrieves the number of result set rows that is the default fetch size for result sets generated from this com::sun::star::sdbcx::Statement object.

## Additional Inherited Members
Public Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name.
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property.
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list.
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName.
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Public Member Functions inherited from XResultSetMetaDataSupplier
XResultSetMetaData | getMetaData () raises (SQLException)
| retrieves the number, types, and properties of a ResultSet's columns.
Public Member Functions inherited from XResultSet
boolean | next () raises (SQLException)
| moves the cursor down one row from its current position.
boolean | isBeforeFirst () raises (SQLException)
| indicates whether the cursor is before the first row in the result set.
boolean | isAfterLast () raises (SQLException)
| indicates whether the cursor is after the last row in the result set.
boolean | isFirst () raises (SQLException)
| indicates whether the cursor is on the first row of the result set.
boolean | isLast () raises (SQLException)
| indicates whether the cursor is on the last row of the result set.
void | beforeFirst () raises (SQLException)
| moves the cursor to the front of the result set, just before the first row.
void | afterLast () raises (SQLException)
| moves the cursor to the end of the result set, just after the last row.
boolean | first () raises (SQLException)
| moves the cursor to the first row in the result set.
boolean | last () raises (SQLException)
| moves the cursor to the last row in the result set.
long | getRow () raises (SQLException)
| retrieves the current row number.
boolean | absolute ([in] long row) raises (SQLException)
| moves the cursor to the given row number in the result set.
boolean | relative ([in]long rows) raises (SQLException)
| moves the cursor a relative number of rows, either positive or negative.
boolean | previous () raises (SQLException)
| moves the cursor to the previous row in the result set.
void | refreshRow () raises (SQLException)
| refreshes the current row with its most recent value in the database.
boolean | rowUpdated () raises (SQLException)
| indicates whether the current row has been updated.
boolean | rowInserted () raises (SQLException)
| indicates whether the current row has had an insertion.
boolean | rowDeleted () raises (SQLException)
| indicates whether a row has been deleted.
com::sun::star::uno::XInterface | getStatement () raises (SQLException)
| returns the Statement that produced this com::sun::star::sdbc::ResultSet object.
Public Member Functions inherited from XRow
boolean | wasNull () raises (SQLException)
| reports whether the last column read had a value of SQL NULL.
string | getString ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a string.
boolean | getBoolean ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as boolean.
byte | getByte ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as a byte.
short | getShort ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a short.
long | getInt ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as an integer.
hyper | getLong ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as a long.
float | getFloat ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a float.
double | getDouble ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a double.
sequence< byte > | getBytes ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a byte array.
com::sun::star::util::Date | getDate ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a date object.
com::sun::star::util::Time | getTime ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a time object.
com::sun::star::util::DateTime | getTimestamp ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a datetime object.
com::sun::star::io::XInputStream | getBinaryStream ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a stream of uninterpreted bytes.
com::sun::star::io::XInputStream | getCharacterStream ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a stream of uninterpreted bytes.
any | getObject ([in]long columnIndex, [in]com::sun::star::container::XNameAccess typeMap) raises (SQLException)
| returns the value of a column in the current row as an object.
XRef | getRef ([in]long columnIndex) raises (SQLException)
| gets a REF(&lt;structured-type&gt;) column value from the current row.
XBlob | getBlob ([in]long columnIndex) raises (SQLException)
| gets a BLOB value in the current row.
XClob | getClob ([in]long columnIndex) raises (SQLException)
| gets a CLOB value in the current row of this `ResultSet` object.
XArray | getArray ([in]long columnIndex) raises (SQLException)
| gets a SQL ARRAY value from the current row of this `ResultSet` object.
Public Member Functions inherited from XColumnLocate
long | findColumn ([in]string columnName) raises (SQLException)
| maps the given ResultSet column name to its ResultSet column index.
Protected Member Functions inherited from XComponent
void | dispose ()
| The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references.
void | addEventListener ([in] XEventListener xListener)
| adds an event listener to the object.
void | removeEventListener ([in] XEventListener aListener)
| removes an event listener from the listener list.
Protected Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.
Protected Member Functions inherited from XCloseable
void | close () raises (SQLException)
| releases all resources connected to an object.
Protected Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo | getPropertySetInfo ()
void | setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
| sets the value of the property with the specified name.
any | getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
void | addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XPropertyChangeListener to the specified property.
void | removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XPropertyChangeListener from the listener list.
void | addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| adds an XVetoableChangeListener to the specified property with the name PropertyName.
void | removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
| removes an XVetoableChangeListener from the listener list.
Protected Member Functions inherited from XWarningsSupplier
any | getWarnings () raises (SQLException)
| returns the first warning reported by calls on an object that supports the usage of warnings.
void | clearWarnings () raises (SQLException)
| clears all warnings reported for the object implementing the interface.
Protected Member Functions inherited from XResultSetMetaDataSupplier
XResultSetMetaData | getMetaData () raises (SQLException)
| retrieves the number, types, and properties of a ResultSet's columns.
Protected Member Functions inherited from XResultSet
boolean | next () raises (SQLException)
| moves the cursor down one row from its current position.
boolean | isBeforeFirst () raises (SQLException)
| indicates whether the cursor is before the first row in the result set.
boolean | isAfterLast () raises (SQLException)
| indicates whether the cursor is after the last row in the result set.
boolean | isFirst () raises (SQLException)
| indicates whether the cursor is on the first row of the result set.
boolean | isLast () raises (SQLException)
| indicates whether the cursor is on the last row of the result set.
void | beforeFirst () raises (SQLException)
| moves the cursor to the front of the result set, just before the first row.
void | afterLast () raises (SQLException)
| moves the cursor to the end of the result set, just after the last row.
boolean | first () raises (SQLException)
| moves the cursor to the first row in the result set.
boolean | last () raises (SQLException)
| moves the cursor to the last row in the result set.
long | getRow () raises (SQLException)
| retrieves the current row number.
boolean | absolute ([in] long row) raises (SQLException)
| moves the cursor to the given row number in the result set.
boolean | relative ([in]long rows) raises (SQLException)
| moves the cursor a relative number of rows, either positive or negative.
boolean | previous () raises (SQLException)
| moves the cursor to the previous row in the result set.
void | refreshRow () raises (SQLException)
| refreshes the current row with its most recent value in the database.
boolean | rowUpdated () raises (SQLException)
| indicates whether the current row has been updated.
boolean | rowInserted () raises (SQLException)
| indicates whether the current row has had an insertion.
boolean | rowDeleted () raises (SQLException)
| indicates whether a row has been deleted.
com::sun::star::uno::XInterface | getStatement () raises (SQLException)
| returns the Statement that produced this com::sun::star::sdbc::ResultSet object.
Protected Member Functions inherited from XResultSetUpdate
void | insertRow () raises (SQLException)
| inserts the contents of the insert row into the result set and the database.
void | updateRow () raises (SQLException)
| updates the underlying database with the new contents of the current row.
void | deleteRow () raises (SQLException)
| deletes the current row from the result set and the underlying database.
void | cancelRowUpdates () raises (SQLException)
| cancels the updates made to a row.
void | moveToInsertRow () raises (SQLException)
| moves the cursor to the insert row.
void | moveToCurrentRow () raises (SQLException)
| moves the cursor to the remembered cursor position, usually the current row.
Protected Member Functions inherited from XRow
boolean | wasNull () raises (SQLException)
| reports whether the last column read had a value of SQL NULL.
string | getString ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a string.
boolean | getBoolean ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as boolean.
byte | getByte ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as a byte.
short | getShort ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a short.
long | getInt ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as an integer.
hyper | getLong ([in]long columnIndex) raises (SQLException)
| get the value of a column in the current row as a long.
float | getFloat ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a float.
double | getDouble ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a double.
sequence< byte > | getBytes ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a byte array.
com::sun::star::util::Date | getDate ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a date object.
com::sun::star::util::Time | getTime ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a time object.
com::sun::star::util::DateTime | getTimestamp ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a datetime object.
com::sun::star::io::XInputStream | getBinaryStream ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a stream of uninterpreted bytes.
com::sun::star::io::XInputStream | getCharacterStream ([in]long columnIndex) raises (SQLException)
| gets the value of a column in the current row as a stream of uninterpreted bytes.
any | getObject ([in]long columnIndex, [in]com::sun::star::container::XNameAccess typeMap) raises (SQLException)
| returns the value of a column in the current row as an object.
XRef | getRef ([in]long columnIndex) raises (SQLException)
| gets a REF(&lt;structured-type&gt;) column value from the current row.
XBlob | getBlob ([in]long columnIndex) raises (SQLException)
| gets a BLOB value in the current row.
XClob | getClob ([in]long columnIndex) raises (SQLException)
| gets a CLOB value in the current row of this `ResultSet` object.
XArray | getArray ([in]long columnIndex) raises (SQLException)
| gets a SQL ARRAY value from the current row of this `ResultSet` object.
Protected Member Functions inherited from XColumnLocate
long | findColumn ([in]string columnName) raises (SQLException)
| maps the given ResultSet column name to its ResultSet column index.
Protected Member Functions inherited from XRowUpdate
void | updateNull ([in]long columnIndex) raises (SQLException)
| gives a nullable column a null value.
void | updateBoolean ([in]long columnIndex, [in]boolean x) raises (SQLException)
| updates a column with a boolean value.
void | updateByte ([in]long columnIndex, [in]byte x) raises (SQLException)
| updates a column with a byte value.
void | updateShort ([in]long columnIndex, [in]short x) raises (SQLException)
| updates a column with a short value.
void | updateInt ([in]long columnIndex, [in]long x) raises (SQLException)
| updates a column with an long value.
void | updateLong ([in]long columnIndex, [in]hyper x) raises (SQLException)
| updates a column with a hyper value.
void | updateFloat ([in]long columnIndex, [in]float x) raises (SQLException)
| updates a column with a float value.
void | updateDouble ([in]long columnIndex, [in]double x) raises (SQLException)
| updates a column with a double value.
void | updateString ([in]long columnIndex, [in]string x) raises (SQLException)
| updates a column with a string value.
void | updateBytes ([in]long columnIndex, [in]sequence< byte > x) raises (SQLException)
| updates a column with a byte array value.
void | updateDate ([in]long columnIndex, [in]com::sun::star::util::Date x) raises (SQLException)
| updates a column with a date value.
void | updateTime ([in]long columnIndex, [in]com::sun::star::util::Time x) raises (SQLException)
| updates a column with a time value.
void | updateTimestamp ([in]long columnIndex, [in]com::sun::star::util::DateTime x) raises (SQLException)
| updates a column with a timestamp value.
void | updateBinaryStream ([in]long columnIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| updates a column with a stream value.
void | updateCharacterStream ([in]long columnIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| updates a column with a stream value.
void | updateObject ([in]long columnIndex, [in]any x) raises (SQLException)
| updates a column with an object value.
void | updateNumericObject ([in]long columnIndex, [in]any x, [in]long scale) raises (SQLException)
| updates a column with an object value.

## Detailed Description

provides access to a table of data.

A ResultSet object is usually generated by executing a Statement.

A ResultSet maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The "next" method moves the cursor to the next row.

The getXXX methods retrieve column values for the current row. You can retrieve values using either the index number of the column. Columns are numbered from 1.

For maximum portability, ResultSet columns within each row should be read in left-to-right order and each column should be read only once.

For the getXXX methods, the SDBC driver attempts to convert the underlying data to the specified type and returns a suitable value.

Column names used as input to the findColumn method are case insensitive. When several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they actually refer to the intended columns.

A ResultSet is automatically closed (disposed) by the Statement that generated it when that Statement is closed, re-executed, or used to retrieve the next result from a sequence of multiple results.

The number, types, and properties of a ResultSet's columns are provided by the ResultSetMetaData object returned by the getMetaData method.

Developers Guide
  Database Access - Result Sets

## Exported Interfaces

## ◆ com::sun::star::beans::XPropertySet

interface com::sun::star::beans::XPropertySet

## ◆ com::sun::star::lang::XComponent

interface com::sun::star::lang::XComponent
| optional

optional for implementation; controls the releasing of resources and the notification of registered listeners.

## ◆ XCloseable

interface XCloseable
| optional

freeing all resources of a result set.

        <p>
        The creating statement will still be open after disposing.
        </p>

        <p>
        This interface is mandatory only for JDBC conformance,
        otherwise it is optional.
        </p>

## ◆ XColumnLocate

interface XColumnLocate

is used for locating a column by its name.

## ◆ XResultSet

interface XResultSet

is the interface for navigating on the rows on a result set.

## ◆ XResultSetMetaDataSupplier

interface XResultSetMetaDataSupplier

provides the access to the result set description.

## ◆ XResultSetUpdate

interface XResultSetUpdate
| optional

is the interface for updating row data to the database.

        <p>
        The implementation is optional.
        </p>

## ◆ XRow

interface XRow

is the interface for accessing the data of the current row.

## ◆ XRowUpdate

interface XRowUpdate
| optional

is the interface for updating the data of the current row.

        <p>
        The implementation is optional.
        </p>

## ◆ XWarningsSupplier

interface XWarningsSupplier
| optional

controls the chaining of warnings, which may occur on every call to the connected database.

Chained warnings from previous calls will be cleared before processing a new call.

This interface is mandatory only for JDBC conformance, otherwise it is optional.

## Member Data Documentation

## ◆ CursorName

string CursorName
| optionalpropertyreadonly

defines the SQL cursor name that will be used by subsequent Statement `execute` methods.

This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database doesn't support positioned update/delete, this property is a noop. To ensure that a cursor has the proper isolation level to support updates, the cursor's SELECT statement should be of the form "select for update ...". If the "for update" phrase is omitted, positioned updates may fail.

Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a connection.

## ◆ FetchDirection

long FetchDirection
| property

retrieves the direction for fetching rows from database tables that is the default for result sets generated from this com::sun::star::sdbcx::Statement object.

If this `Statement` object has not set a fetch direction, the return value is implementation-specific.

## ◆ FetchSize

long FetchSize
| property

retrieves the number of result set rows that is the default fetch size for result sets generated from this com::sun::star::sdbcx::Statement object.

If this com::sun::star::sdbcx::Statement object has not set a fetch size, the return value is implementation-specific.

## ◆ ResultSetConcurrency

long ResultSetConcurrency
| propertyreadonly

retrieves the result set concurrency.

See also
  com::sun::star::sdbc::ResultSetConcurrency

## ◆ ResultSetType

long ResultSetType
| propertyreadonly

determines the result set type.

See also
  com::sun::star::sdbc::ResultSetType

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

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