Result Sets

From Apache OpenOffice Wiki
Jump to: navigation, search



The ResultSet objects represent the output of an SQL SELECT command in data rows and columns to retrieve the data using a row cursor that points to one data row at a time. The following illustration shows the inheritance of com.sun.star.sdb.ResultSet. Each layer of the Apache OpenOffice API database integration adds capabilities to Apache OpenOffice API result sets.

The fundamental com.sun.star.sdbc.ResultSet is the most powerful of the three result set services. Basically this result set is sufficient to process SELECT results. It is used to navigate through the resulting rows, and to retrieve and update data rows and the column values in a row.

ResultSet

The com.sun.star.sdbcx.ResultSet can add bookmarks through com.sun.star.sdbcx.XRowLocate and allows row deletion by bookmarks through com.sun.star.sdbcx.XDeleteRows.

The com.sun.star.sdb.ResultSet service extends the com.sun.star.sdbcx.ResultSet service by the additional interface com.sun.star.sdbcx.XColumnsSupplier that allows the user to access information about the appearance of the selected columns in the application. The interface XColumnsSupplier returns a com.sun.star.sdbcx.Container of ResultColumns.

ResultColumn

The com.sun.star.sdb.ResultColumn service inherits the properties of the services com.sun.star.sdbcx.Column and com.sun.star.sdb.ColumnSettings.

The following table explains the properties introduced with com.sun.star.sdb.ResultColumn. For the inherited properties, refer to the section Tables and Columns.

Properties of com.sun.star.sdb.ResultColumn
IsSearchable boolean - Indicates if the column can be used in a "WHERE" clause.
IsSigned boolean - Indicates if values in the column are signed numbers.
IsCaseSensitive boolean - Indicates if a column is case sensitive.
DisplaySize long - Indicates the column's normal, maximum width in chars.
Label string - Gets the suggested column title for use with GUI controls and printouts.
IsReadOnly boolean - If True, cannot write to the column.
IsWritable boolean - If True, an attempt to write to the column may succeed.
IsDefinitelyWritable boolean - If True, the column is writable.
ServiceName string - Returns the fully-qualified name of the service that is returned when the com.sun.star.sdbc.XRow method getObject() is called to retrieve a value from the column.
TableName string - Gets the database table name where the column comes from.
SchemaName string - Gets the schema name of the column.
CatalogName string - Gets the catalog name of the column.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages