LibreOffice: CallableStatement Service Reference

LibreOffice LibreOffice 7.5 SDK API Reference

Loading...
Searching...
No Matches
Included Services | Exported Interfaces | List of all members
CallableStatement Service Referencepublished

is used to execute SQL stored procedures. More...

Inheritance diagram for CallableStatement:

## Included Services
service | PreparedStatement

## Exported Interfaces
interface | XRow
| is used for retrieve the values of OUT parameters.
interface | XOutParameters
| is used to declare parameters as OUT parameters.
Exported Interfaces inherited from PreparedStatement
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 statement.
interface | com::sun::star::beans::XPropertySet
interface | com::sun::star::util::XCancellable
| could be used for canceling the execution of SQL statements, if both the DBMS and the driver support aborting an SQL statement.
interface | XPreparedStatement
| is the interface for executing SQL prepared commands.
interface | XResultSetMetaDataSupplier
| provides access to the description of the result set which would be generated by executing the PreparedStatement.
interface | XParameters
| is used for setting parameters before execution of the precompiled statement.
interface | XPreparedBatchExecution
| provides the ability of batch execution.
interface | XWarningsSupplier
| controls the chaining of warnings, which may occur on every call to the connected database.
interface | XMultipleResults
| covers the handling of multiple results after executing an SQL command.

## Additional Inherited Members
Public Member Functions inherited from XCloseable
void | close () raises (SQLException)
| releases all resources connected to an object.
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 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 XPreparedStatement
XResultSet | executeQuery () raises (SQLException)
| executes the SQL query in this `PreparedStatement` object and returns the result set generated by the query.
long | executeUpdate () raises (SQLException)
| executes the SQL INSERT, UPDATE or DELETE statement in this com::sun::star::sdbc::PreparedStatement object.
boolean | execute () raises (SQLException)
| executes any kind of SQL statement.
XConnection | getConnection () raises (SQLException)
| returns the com::sun::star::sdbc::Connection object that produced this com::sun::star::sdbc::Statement object.
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 XParameters
void | setNull ([in]long parameterIndex, [in]long sqlType) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setObjectNull ([in]long parameterIndex, [in]long sqlType, [in]string typeName) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setBoolean ([in]long parameterIndex, [in]boolean x) raises (SQLException)
| sets the designated parameter to a boolean value.
void | setByte ([in]long parameterIndex, [in]byte x) raises (SQLException)
| sets the designated parameter to a byte value.
void | setShort ([in]long parameterIndex, [in]short x) raises (SQLException)
| sets the designated parameter to a short value.
void | setInt ([in]long parameterIndex, [in]long x) raises (SQLException)
| sets the designated parameter to a long value.
void | setLong ([in]long parameterIndex, [in]hyper x) raises (SQLException)
| sets the designated parameter to a hyper value.
void | setFloat ([in]long parameterIndex, [in]float x) raises (SQLException)
| sets the designated parameter to a float value.
void | setDouble ([in]long parameterIndex, [in]double x) raises (SQLException)
| sets the designated parameter to a double value.
void | setString ([in]long parameterIndex, [in]string x) raises (SQLException)
| sets the designated parameter to a string value.
void | setBytes ([in]long parameterIndex, [in]sequence< byte > x) raises (SQLException)
| sets the designated parameter to a sequence of bytes.
void | setDate ([in]long parameterIndex, [in]com::sun::star::util::Date x) raises (SQLException)
| sets the designated parameter to a date value.
void | setTime ([in]long parameterIndex, [in]com::sun::star::util::Time x) raises (SQLException)
| sets the designated parameter to a time value.
void | setTimestamp ([in]long parameterIndex, [in]com::sun::star::util::DateTime x) raises (SQLException)
| sets the designated parameter to a datetime value.
void | setBinaryStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setCharacterStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setObject ([in]long parameterIndex, [in]any x) raises (SQLException)
| sets the value of a parameter using an any.
void | setObjectWithInfo ([in]long parameterIndex, [in]any x, [in]long targetSqlType, [in]long scale) raises (SQLException)
| set a value from the Datatype ANY for a parameter.
void | setRef ([in]long parameterIndex, [in]XRef x) raises (SQLException)
| sets a REF(&lt;structured-type&gt;) parameter.
void | setBlob ([in]long parameterIndex, [in]XBlob x) raises (SQLException)
| sets a BLOB parameter.
void | setClob ([in]long parameterIndex, [in]XClob x) raises (SQLException)
| sets a CLOB parameter.
void | setArray ([in]long parameterIndex, [in]XArray x) raises (SQLException)
| sets an Array parameter.
void | clearParameters () raises (SQLException)
| clears the current parameter values immediately.
Public 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.
Public Member Functions inherited from XMultipleResults
XResultSet | getResultSet () raises (SQLException)
| returns the current result as a com::sun::star::sdbc::ResultSet object.
long | getUpdateCount () raises (SQLException)
| returns the current result as an update count.
boolean | getMoreResults () raises (SQLException)
| moves to a Statement's next result.
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 XOutParameters
void | registerOutParameter ([in]long parameterIndex, [in]long sqlType, [in]string typeName) raises (SQLException)
| registers the designated output parameter.
void | registerNumericOutParameter ([in]long parameterIndex, [in]long sqlType, [in]long scale) raises (SQLException)
| registers the OUT parameter in ordinal position `parameterIndex` to the SDBC type `sqlType`.
Public Attributes inherited from PreparedStatement
long | QueryTimeOut
| retrieves the number of seconds the driver will wait for a Statement to execute.
long | MaxFieldSize
| returns the maximum number of bytes allowed for any column value.
long | MaxRows
| retrieves the maximum number of rows that a ResultSet can contain.
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
| Determine 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 `Statement` object.
long | FetchSize
| retrieves the number of result set rows that is the default fetch size for result sets generated from this `Statement` object.
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 XCancellable
void | cancel ()
| cancels the current job of the object.
Protected Member Functions inherited from XPreparedStatement
XResultSet | executeQuery () raises (SQLException)
| executes the SQL query in this `PreparedStatement` object and returns the result set generated by the query.
long | executeUpdate () raises (SQLException)
| executes the SQL INSERT, UPDATE or DELETE statement in this com::sun::star::sdbc::PreparedStatement object.
boolean | execute () raises (SQLException)
| executes any kind of SQL statement.
XConnection | getConnection () raises (SQLException)
| returns the com::sun::star::sdbc::Connection object that produced this com::sun::star::sdbc::Statement object.
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 XParameters
void | setNull ([in]long parameterIndex, [in]long sqlType) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setObjectNull ([in]long parameterIndex, [in]long sqlType, [in]string typeName) raises (SQLException)
| sets the designated parameter to SQL NULL.
void | setBoolean ([in]long parameterIndex, [in]boolean x) raises (SQLException)
| sets the designated parameter to a boolean value.
void | setByte ([in]long parameterIndex, [in]byte x) raises (SQLException)
| sets the designated parameter to a byte value.
void | setShort ([in]long parameterIndex, [in]short x) raises (SQLException)
| sets the designated parameter to a short value.
void | setInt ([in]long parameterIndex, [in]long x) raises (SQLException)
| sets the designated parameter to a long value.
void | setLong ([in]long parameterIndex, [in]hyper x) raises (SQLException)
| sets the designated parameter to a hyper value.
void | setFloat ([in]long parameterIndex, [in]float x) raises (SQLException)
| sets the designated parameter to a float value.
void | setDouble ([in]long parameterIndex, [in]double x) raises (SQLException)
| sets the designated parameter to a double value.
void | setString ([in]long parameterIndex, [in]string x) raises (SQLException)
| sets the designated parameter to a string value.
void | setBytes ([in]long parameterIndex, [in]sequence< byte > x) raises (SQLException)
| sets the designated parameter to a sequence of bytes.
void | setDate ([in]long parameterIndex, [in]com::sun::star::util::Date x) raises (SQLException)
| sets the designated parameter to a date value.
void | setTime ([in]long parameterIndex, [in]com::sun::star::util::Time x) raises (SQLException)
| sets the designated parameter to a time value.
void | setTimestamp ([in]long parameterIndex, [in]com::sun::star::util::DateTime x) raises (SQLException)
| sets the designated parameter to a datetime value.
void | setBinaryStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setCharacterStream ([in]long parameterIndex, [in]com::sun::star::io::XInputStream x, [in]long length) raises (SQLException)
| sets the designated parameter to the given input stream, which will have the specified number of bytes.
void | setObject ([in]long parameterIndex, [in]any x) raises (SQLException)
| sets the value of a parameter using an any.
void | setObjectWithInfo ([in]long parameterIndex, [in]any x, [in]long targetSqlType, [in]long scale) raises (SQLException)
| set a value from the Datatype ANY for a parameter.
void | setRef ([in]long parameterIndex, [in]XRef x) raises (SQLException)
| sets a REF(&lt;structured-type&gt;) parameter.
void | setBlob ([in]long parameterIndex, [in]XBlob x) raises (SQLException)
| sets a BLOB parameter.
void | setClob ([in]long parameterIndex, [in]XClob x) raises (SQLException)
| sets a CLOB parameter.
void | setArray ([in]long parameterIndex, [in]XArray x) raises (SQLException)
| sets an Array parameter.
void | clearParameters () raises (SQLException)
| clears the current parameter values immediately.
Protected Member Functions inherited from XPreparedBatchExecution
void | addBatch () raises (SQLException)
| adds a set of parameters to the batch.
void | clearBatch () raises (SQLException)
| makes the set of commands in the current batch empty.
sequence< long > | executeBatch () raises (SQLException)
| submits a batch of commands to the database for execution.
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 XMultipleResults
XResultSet | getResultSet () raises (SQLException)
| returns the current result as a com::sun::star::sdbc::ResultSet object.
long | getUpdateCount () raises (SQLException)
| returns the current result as an update count.
boolean | getMoreResults () raises (SQLException)
| moves to a Statement's next result.

## Detailed Description

is used to execute SQL stored procedures.

SDBC provides a stored procedure SQL escape that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output, or both. Parameters are referred to sequentially, by number. The first parameter is 1.

`{?=call&lt;procedure-name&gt;[&lt;arg1&gt;,&lt;arg2&gt;,...]}
{call&lt;procedure-name&gt;[&lt;arg1&gt;,&lt;arg2&gt;,...]}`

IN parameter values are set using the set methods inherited from com::sun::star::sdbc::PreparedStatement . The type of all OUT parameters must be registered prior to executing the stored procedure; their values are retrieved after execution via the `get` methods provided by the com::sun::star::sdbc::XRow.

A `CallableStatement` can return one com::sun::star::sdbc::XResultSet or multiple com::sun::star::sdbc::ResultSet objects. Multiple `ResultSet` objects are handled using operations inherited from com::sun::star::sdbc::XPreparedStatement.

For maximum portability, a call's com::sun::star::sdbc::ResultSet objects and update counts should be processed prior to getting the values of output parameters.

## Exported Interfaces

## ◆ PreparedStatement

service PreparedStatement

## Exported Interfaces

## ◆ XOutParameters

interface XOutParameters

is used to declare parameters as OUT parameters.

## ◆ XRow

interface XRow

is used for retrieve the values of OUT parameters.

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

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