interface XSQLInput in module com::sun::star::sdbc::

(Global Index)

Syntax

interface XSQLInput : com::sun::star::uno::XInterface ;

Description

represents an input stream that contains a stream of values representing an instance of a SQL structured or distinct type.

This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes SQLInput methods.

When the method getObject is called with an object of a service implementing the interface SQLData , the SDBC driver calls the method XSQLData::getSQLType() to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an instance of XSQLInput , populating it with the attributes of the UDT. The driver then passes the input stream to the method XSQLData::readSQL() , which in turn calls the XSQLInput.readXXX methods in its implementation for reading the attributes from the input stream.

Method Summary

readString reads the next attribute in the stream as string.

readBoolean reads the next attribute in the stream as boolean.

readByte reads the next attribute in the stream as byte.

readShort reads the next attribute in the stream as short.

readInt reads the next attribute in the stream as long.

readLong reads the next attribute in the stream as hyper.

readFloat reads the next attribute in the stream as float.

readDouble reads the next attribute in the stream as double.

readBytes reads the next attribute in the stream as sequence of bytes.

readDate reads the next attribute in the stream as date.

readTime reads the next attribute in the stream as time.

readTimestamp reads the next attribute in the stream as datetime.

readBinaryStream reads the next attribute in the stream as sequence of bytes.

readCharacterStream reads the next attribute in the stream as a unicode string.

readObject returns the datum at the head of the stream as an any.

readRef reads a REF(<structured-type>) from the stream.

readBlob reads a BLOB from the stream.

readClob reads a CLOB from the stream.

readArray reads an array from the stream.

wasNull determines whether the last value read was null.

Method Details



readString

Syntax

string readString ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as string.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readBoolean

Syntax

boolean readBoolean ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as boolean.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readByte

Syntax

byte readByte ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as byte.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readShort

Syntax

short readShort ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as short.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readInt

Syntax

long readInt ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as long.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readLong

Syntax

hyper readLong ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as hyper.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readFloat

Syntax

float readFloat ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as float.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readDouble

Syntax

double readDouble ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as double.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readBytes

Syntax

sequence< byte > readBytes ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as sequence of bytes.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readDate

Syntax

com::sun::star::util::Date readDate ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as date.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readTime

Syntax

com::sun::star::util::Time readTime ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as time.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readTimestamp

Syntax

com::sun::star::util::DateTime readTimestamp ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as datetime.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readBinaryStream

Syntax

com::sun::star::io::XInputStream readBinaryStream ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as sequence of bytes.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readCharacterStream

Syntax

com::sun::star::io::XInputStream readCharacterStream ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads the next attribute in the stream as a unicode string.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readObject

Syntax

any readObject ();
raises ( com::sun::star::sdbc::SQLException );

Description

returns the datum at the head of the stream as an any.

The actual type of the any returned is determined by the default type mapping, and any customizations present in this stream's type map.
A type map is registered with the stream by the SDBC driver before the stream is passed to the application.
When the datum at the head of the stream is a SQL NULL, the method returns void . If the datum is a SQL structured or distinct type, it determines the SQL type of the datum at the head of the stream, constructs an object of the appropriate service, and calls the method XSQLData::readSQL() on that object, which reads additional data from the stream using the protocol described for that method.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readRef

Syntax

com::sun::star::sdbc::XRef readRef ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads a REF(&lt;structured-type&gt;) from the stream.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readBlob

Syntax

com::sun::star::sdbc::XBlob readBlob ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads a BLOB from the stream.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readClob

Syntax

com::sun::star::sdbc::XClob readClob ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads a CLOB from the stream.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

readArray

Syntax

com::sun::star::sdbc::XArray readArray ();
raises ( com::sun::star::sdbc::SQLException );

Description

reads an array from the stream.

Returns

the attribute; if the value is SQL NULL, return null.

Throws

SQLException if a database access error occurs.

wasNull

Syntax

boolean wasNull ();
raises ( com::sun::star::sdbc::SQLException );

Description

determines whether the last value read was null.

Returns

true if the most recently gotten SQL value was null; otherwise, false

Throws

SQLException if a database access error occurs.
Top of Page