|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.gds.impl.AbstractGDS
org.firebirdsql.gds.impl.jni.BaseGDSImpl
public abstract class BaseGDSImpl
| Field Summary | |
|---|---|
protected static byte[] |
DESCRIBE_DATABASE_INFO_BLOCK
|
int |
isc_api_handle
|
| Constructor Summary | |
|---|---|
BaseGDSImpl()
|
|
BaseGDSImpl(GDSType gdsType)
|
|
| Method Summary | |
|---|---|
BlobParameterBuffer |
createBlobParameterBuffer()
Create a new BlobParameterBuffer instance for setting blob
parameters in the current GDS implementation. |
DatabaseParameterBuffer |
createDatabaseParameterBuffer()
Create a new DatabaseParameterBuffer instance for setting
database parameters in the current GDS implementation. |
EventHandle |
createEventHandle(String eventName)
Create a new EventHandle specific to a given
GDS implementation. |
IscBlobHandle |
createIscBlobHandle()
Factory method to create a new IscBlobHandle instance
specific to the implementation of this interface. |
IscDbHandle |
createIscDbHandle()
Factory method to create a new IscDbHandle instance specific to
the implementation of this interface. |
IscStmtHandle |
createIscStmtHandle()
Factory method to create a new IscStmtHandle instance
specific to the implementation of this interface. |
IscSvcHandle |
createIscSvcHandle()
Factory method to create a new IscSvcHandle instance
that is linked to the current GDS implemenation. |
IscTrHandle |
createIscTrHandle()
Factory method to create a new IscTrHandle instance that
is linked to the current GDS implementation. |
ServiceParameterBuffer |
createServiceParameterBuffer()
Create a new ServiceParameterBuffer instance for setting
service parameters in the current GDS implementation. |
ServiceRequestBuffer |
createServiceRequestBuffer(int taskIdentifier)
Create a new ServiceRequestBuffer instance for setting
service request parameters in the current GDS implementation. |
protected byte[] |
getByteArrayForString(String statement,
String encoding)
|
protected abstract String |
getServerUrl(String file_name)
|
void |
getSqlCounts(IscStmtHandle stmt_handle)
Fetch count information for a statement. |
protected byte[] |
getZeroTerminatedArray(byte[] stringBytes)
|
void |
iscAttachDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
Attach to an existing database via a filename. |
byte[] |
iscBlobInfo(IscBlobHandle handle,
byte[] items,
int buffer_length)
Retrieve data about an existing blob. |
void |
iscCancelEvents(IscDbHandle dbHandle,
EventHandle eventHandle)
Cancel event listening based on an EventHandle. |
void |
iscCloseBlob(IscBlobHandle blob_handle)
Close an open blob. |
void |
iscCommitRetaining(IscTrHandle tr_handle)
|
void |
iscCommitTransaction(IscTrHandle tr_handle)
Commit a transaction. |
void |
iscCreateBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
Create a new blob within a given transaction. |
void |
iscCreateDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
Create a database based on the supplied filename and database parameters. |
byte[] |
iscDatabaseInfo(IscDbHandle db_handle,
byte[] items,
int buffer_length)
Get information about the database to which IscDbHandle is
attached. |
void |
iscDetachDatabase(IscDbHandle db_handle)
Detach the given database handle from its database. |
void |
iscDropDatabase(IscDbHandle db_handle)
Drop (delete) the database to which IscDbHandle is attached. |
void |
iscDsqlAllocateStatement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
Allocate a dynamic SQL (DSQL) statement on the database to which IscDbHandle is attached. |
XSQLDA |
iscDsqlDescribe(IscStmtHandle stmt_handle,
int da_version)
Retrieve data for a statement. |
XSQLDA |
iscDsqlDescribeBind(IscStmtHandle stmt_handle,
int da_version)
Retrieve data for a bind statement. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
|
void |
iscDsqlExecute(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda)
Execute a statement with only outgoing data. |
void |
iscDsqlExecute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a statement with outgoing and incoming data. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA xsqlda)
|
void |
iscDsqlFetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
Retrieve record data from a statement. |
void |
iscDsqlFreeStatement(IscStmtHandle stmt_handle,
int option)
Free a statement in the database that is pointed to by a valid handle. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
Prepare a string SQL statement for execution in the database. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
int dialect)
Prepare a string SQL statement for execution in the database. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
String encoding,
int dialect)
|
void |
iscDsqlSetCursorName(IscStmtHandle stmt_handle,
String cursor_name,
int type)
Set the name to be used for a given statement. |
byte[] |
iscDsqlSqlInfo(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
Retrieve data about a statement. |
void |
iscEventBlock(EventHandle eventHandle)
Initialize the internal databastructures for an EventHandle. |
void |
iscEventCounts(EventHandle eventHandle)
Retrieve count information after an event has occurred. |
byte[] |
iscExpandDpb(byte[] dpb,
int dpb_length,
int param,
Object[] params)
|
byte[] |
iscGetSegment(IscBlobHandle blob,
int maxread)
Fetch a segment of a blob. |
void |
iscOpenBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
Open a blob within a given transaction. |
void |
iscPrepareTransaction(IscTrHandle tr_handle)
|
void |
iscPrepareTransaction2(IscTrHandle tr_handle,
byte[] bytes)
|
void |
iscPutSegment(IscBlobHandle blob_handle,
byte[] buffer)
Write a segment of data to a blob. |
int |
iscQueueEvents(IscDbHandle dbHandle,
EventHandle eventHandle,
EventHandler eventHandler)
Queue an EventHandler. |
void |
iscReconnectTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
long transactionId)
Reconnect "in limbo" transaction using new database handle. |
void |
iscRollbackRetaining(IscTrHandle tr_handle)
|
void |
iscRollbackTransaction(IscTrHandle tr_handle)
Rollback a transaction. |
void |
iscSeekBlob(IscBlobHandle handle,
int position,
int mode)
Seek to a given position in a blob. |
void |
iscServiceAttach(String service,
IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer)
Attach to a Service Manager. |
void |
iscServiceDetach(IscSvcHandle serviceHandle)
Detach from a Service Manager. |
void |
iscServiceQuery(IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
byte[] resultBuffer)
Query a service manager |
void |
iscServiceStart(IscSvcHandle serviceHandle,
ServiceRequestBuffer serviceRequestBuffer)
Start a service operation. |
void |
iscStartTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
TransactionParameterBuffer tpb)
Start a transaction based on a handle to a transaction. |
byte[] |
iscTransactionInformation(IscTrHandle trHandle,
byte[] requestBuffer,
int bufferLen)
|
int |
iscVaxInteger(byte[] buffer,
int pos,
int length)
Retrieve an integer value from a sequence of bytes. |
int |
iscVaxInteger2(byte[] buffer,
int pos)
|
abstract void |
native_isc_attach_database(byte[] file_name,
IscDbHandle db_handle,
byte[] dpbBytes)
|
abstract byte[] |
native_isc_blob_info(isc_blob_handle_impl handle,
byte[] items,
int buffer_length)
|
abstract void |
native_isc_cancel_events(IscDbHandle db_handle,
EventHandleImp eventHandle)
|
abstract void |
native_isc_close_blob(IscBlobHandle blob)
|
abstract void |
native_isc_commit_retaining(IscTrHandle tr_handle)
|
abstract void |
native_isc_commit_transaction(IscTrHandle tr_handle)
|
abstract void |
native_isc_create_blob2(IscDbHandle db,
IscTrHandle tr,
IscBlobHandle blob,
byte[] dpbBytes)
|
abstract void |
native_isc_create_database(byte[] file_name,
IscDbHandle db_handle,
byte[] dpbBytes)
|
abstract void |
native_isc_database_info(IscDbHandle db_handle,
int item_length,
byte[] items,
int buffer_length,
byte[] buffer)
|
abstract void |
native_isc_detach_database(IscDbHandle db_handle)
|
abstract void |
native_isc_drop_database(IscDbHandle db_handle)
|
abstract void |
native_isc_dsql_alloc_statement2(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
|
abstract void |
native_isc_dsql_allocate_statement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
|
abstract XSQLDA |
native_isc_dsql_describe_bind(IscStmtHandle stmt_handle,
int da_version)
|
abstract XSQLDA |
native_isc_dsql_describe(IscStmtHandle stmt_handle,
int da_version)
|
abstract void |
native_isc_dsql_exec_immed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
|
abstract void |
native_isc_dsql_execute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
|
abstract boolean |
native_isc_dsql_fetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
|
abstract void |
native_isc_dsql_free_statement(IscStmtHandle stmt_handle,
int option)
|
abstract XSQLDA |
native_isc_dsql_prepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
|
abstract void |
native_isc_dsql_set_cursor_name(IscStmtHandle stmt_handle,
String cursor_name,
int type)
|
abstract byte[] |
native_isc_dsql_sql_info(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
|
abstract long |
native_isc_event_block(EventHandleImp eventHandle,
String eventNames)
|
abstract void |
native_isc_event_counts(EventHandleImp eventHandle)
|
abstract byte[] |
native_isc_get_segment(IscBlobHandle blob,
int maxread)
|
abstract void |
native_isc_open_blob2(IscDbHandle db,
IscTrHandle tr,
IscBlobHandle blob,
byte[] dpbBytes)
|
abstract void |
native_isc_prepare_transaction(IscTrHandle tr_handle)
|
abstract void |
native_isc_prepare_transaction2(IscTrHandle tr_handle,
byte[] bytes)
|
abstract void |
native_isc_put_segment(IscBlobHandle blob_handle,
byte[] buffer)
|
abstract int |
native_isc_que_events(IscDbHandle db_handle,
EventHandleImp eventHandle,
EventHandler handler)
|
abstract void |
native_isc_reconnect_transaction(IscDbHandle dbHandle,
IscTrHandle trHandle,
byte[] txId)
|
abstract void |
native_isc_rollback_retaining(IscTrHandle tr_handle)
|
abstract void |
native_isc_rollback_transaction(IscTrHandle tr_handle)
|
abstract void |
native_isc_seek_blob(isc_blob_handle_impl handle,
int position,
int mode)
|
abstract void |
native_isc_service_attach(String service,
IscSvcHandle serviceHandle,
byte[] serviceParameterBuffer)
|
abstract void |
native_isc_service_detach(IscSvcHandle serviceHandle)
|
abstract void |
native_isc_service_query(IscSvcHandle serviceHandle,
byte[] sendServiceParameterBuffer,
byte[] requestServiceParameterBuffer,
byte[] resultBuffer)
|
abstract void |
native_isc_service_start(IscSvcHandle serviceHandle,
byte[] serviceParameterBuffer)
|
abstract void |
native_isc_start_transaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
byte[] tpb)
|
abstract byte[] |
native_isc_transaction_info(IscTrHandle tr_handle,
byte[] items,
int bufferSize)
|
TransactionParameterBuffer |
newTransactionParameterBuffer()
Create new TransactionParameterBuffer instance for setting
transaction parameters in the current GDS implementation. |
void |
readSQLData(XSQLDA xsqlda,
isc_stmt_handle_impl stmt)
|
| Methods inherited from class org.firebirdsql.gds.impl.AbstractGDS |
|---|
close, getGdsType, getType, readExternal, readResolve, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final byte[] DESCRIBE_DATABASE_INFO_BLOCK
public int isc_api_handle
| Constructor Detail |
|---|
public BaseGDSImpl()
public BaseGDSImpl(GDSType gdsType)
| Method Detail |
|---|
protected abstract String getServerUrl(String file_name)
throws GDSException
GDSExceptionpublic BlobParameterBuffer createBlobParameterBuffer()
GDSBlobParameterBuffer instance for setting blob
parameters in the current GDS implementation.
BlobParameterBufferpublic DatabaseParameterBuffer createDatabaseParameterBuffer()
GDSDatabaseParameterBuffer instance for setting
database parameters in the current GDS implementation.
DatabaseParameterBufferpublic IscBlobHandle createIscBlobHandle()
GDSIscBlobHandle instance
specific to the implementation of this interface.
IscBlobHandle instancepublic IscDbHandle createIscDbHandle()
GDSIscDbHandle instance specific to
the implementation of this interface.
IscDbHandlepublic IscStmtHandle createIscStmtHandle()
GDSIscStmtHandle instance
specific to the implementation of this interface.
IscStmtHandle instancepublic IscSvcHandle createIscSvcHandle()
GDSIscSvcHandle instance
that is linked to the current GDS implemenation.
IscSvcHandle instancepublic IscTrHandle createIscTrHandle()
GDSIscTrHandle instance that
is linked to the current GDS implementation.
IscTrHandle instancepublic ServiceParameterBuffer createServiceParameterBuffer()
GDSServiceParameterBuffer instance for setting
service parameters in the current GDS implementation.
ServiceParameterBufferpublic ServiceRequestBuffer createServiceRequestBuffer(int taskIdentifier)
GDSServiceRequestBuffer instance for setting
service request parameters in the current GDS implementation. The
returned ServiceRequestBuffer is linked to a specific
Services API task, and must be one of the isc_info_svc_*
or isc_action_svc constants from ISCConstants.
taskIdentifier - The specific Services API task for which the
ServiceRequestBuffer is created
ServiceRequestBuffer
public void iscAttachDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDS
file_name - The filename for the database, including host and port. The
expected format is
<host name>/<port>:<file path>.
The value for host is localhost if not supplied. The value for
port is 3050 if not supplied.db_handle - The handle to attach to the databasedatabaseParameterBuffer - parameters for the database attachment
GDSException - if an error occurs while attaching to the database
public byte[] iscBlobInfo(IscBlobHandle handle,
byte[] items,
int buffer_length)
throws GDSException
GDSitems, and the corresponding values are
returned. The values in items should be
isc_info_blob_* constants from ISCConstants.
handle - Handle to the blob for which data is to be retrieveditems - Parameters to be fetched about the blobbuffer_length - Length of the byte array to be returned
items
GDSException - if an error occurs while fetching data about the blob
public void iscCloseBlob(IscBlobHandle blob_handle)
throws GDSException
GDS
blob_handle - Handle to the blob to be closed
GDSException - if an error occurs while closing the blob
public void iscCommitRetaining(IscTrHandle tr_handle)
throws GDSException
GDSException
public void iscCommitTransaction(IscTrHandle tr_handle)
throws GDSException
GDS
tr_handle - Handle to the transaction to be committed.
GDSException - if an error occurs while committing the transactionGDS.iscRollbackTransaction(IscTrHandle)
public void iscCreateBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
throws GDSException
GDS
db_handle - Handle to the database in which the blob will be createdtr_handle - Handle to the transaction in which the blob will be createdblob_handle - Handle to be attached to the newly created blobblobParameterBuffer - contains parameters for creation of the new blob, can be null
GDSException - if an error occurs while creating the blob
public void iscCreateDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDSIscDbHandle is attached to the newly
created database.
file_name - The filename for the new database, including host and port.
The expected format is host:port:filepath. The value for host
is localhost if not supplied. The value for port is 3050 if
not supplied.db_handle - The handle to attach to the new databasedatabaseParameterBuffer - The parameters for the new database and attachment to it
GDSException - if an error occurs while creating the database
public byte[] iscDatabaseInfo(IscDbHandle db_handle,
byte[] items,
int buffer_length)
throws GDSException
GDSIscDbHandle is
attached. The requested parameters are values set in items,
and the values in the returned byte-array correspond to the requested
parameters in items
db_handle - Handle to the database for which info is to be retrieveditems - An array of values from the isc_info_* constant
fields from ISCConstantsbuffer_length - The size of the byte array that is to be returned
items
GDSException - if an error occurs while retrieving database info
public void iscDetachDatabase(IscDbHandle db_handle)
throws GDSException
GDS
db_handle - The handle to be detached
GDSException - if an error occurs while detaching from the database
public void iscDropDatabase(IscDbHandle db_handle)
throws GDSException
GDSIscDbHandle is attached.
db_handle - Handle to the database to be dropped
GDSException - if an error occurs while dropping the database
public void iscDsqlAllocateStatement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
throws GDSException
GDSIscDbHandle is attached.
db_handle - Handle to the database where the statement is to be allocatedstmt_handle - Handle to attach to the newly allocated statement
GDSException - if an error occurs while allocating the statement
public XSQLDA iscDsqlDescribe(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDS
stmt_handle - Handle to the statement about which data is to be retrievedda_version - Version of the XSQLDA to be retrieved
GDSException - if an error occurs while retrieving statement data
public XSQLDA iscDsqlDescribeBind(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDS
stmt_handle - Handle to the bind statement about which bind data is to be
retrievedda_version - Version of the XSQLDA to be retrieved
GDSException - if an error occurs while retrieving statement data
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
db_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Holder for data retrieved from the database
GDSException - if an error occurs while executing the statement
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
db_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Placeholder for data retrieved from executing the SQL
statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDSException
public void iscDsqlExecute(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda)
throws GDSException
GDS
tr_handle - Handle to the transaction in which the statement is to be
executedstmt_handle - Handle to the statement to be executedda_version - Version of XSQLDA to be usedxsqlda - Input data for executing the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
tr_handle - Handle to the transaction in which the statement is to be
executedstmt_handle - Handle to the statement to be executedda_version - Version of XSQLDA to be usedin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Holder for data to be received from executing the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA xsqlda)
throws GDSException
GDS
db_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsxsqlda - Data to be sent to the database for the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA xsqlda)
throws GDSException
GDS
db_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - SQL command to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsxsqlda - Data to be sent to the database for the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA xsqlda)
throws GDSException
GDSException
public void iscDsqlFetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
throws GDSException
GDSfetchSize records will be fetched.
stmt_handle - Handle to the statement for which records are to be fetchedda_version - Version of XSQLDA to be usedxsqlda - Holder for records that are fetchedfetchSize - The maximum number of records to be fetched
GDSException - if an error occurs while fetching the records
public void iscDsqlFreeStatement(IscStmtHandle stmt_handle,
int option)
throws GDSException
GDSoption. option should be one of
ISCConstants.DSQL_drop or ISCConstants.DSQL_close.
stmt_handle - Handle to the statement to be freedoption - Option to be used when freeing the statement. If the value is
ISCConstants.DSQL_drop, the statement will be
deallocated, if the value is ISCConstants.DSQL_close,
the statement will only be closed
GDSException
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
throws GDSException
GDS
tr_handle - Handle to the transaction in which the SQL statement is to be
preparedstmt_handle - Handle to the statement for which the SQL is to be preparedstatement - byte-array with containing the SQL to be prepareddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstants
GDSException - if an error occurs while preparing the SQL
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
int dialect)
throws GDSException
GDS
tr_handle - Handle to the transaction in which the SQL statement is to be
preparedstmt_handle - Handle to the statement for which the SQL is to be preparedstatement - The SQL statement to be prepareddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstants
GDSException - if an error occurs while preparing the SQL
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
String encoding,
int dialect)
throws GDSException
GDSException
public void iscDsqlSetCursorName(IscStmtHandle stmt_handle,
String cursor_name,
int type)
throws GDSException
GDS
stmt_handle - Handle to the statement for which the cursor name is to be setcursor_name - Name to set for the cursortype - Reserved for future use
GDSException - if an error occurs while setting the cursor name
public byte[] iscDsqlSqlInfo(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
throws GDSException
GDSisc_info_sql_* constants defined in
ISCConstants. An array with corresponding values for the
requested parameters is returned.
stmt_handle - Handle to the statement about which data is to be retrieveditems - Array of parameters whose values are to be retrievedbuffer_length - The length of the byte-array to be returned
GDSException - if an error occurs while retrieving the statement info
public byte[] iscExpandDpb(byte[] dpb,
int dpb_length,
int param,
Object[] params)
throws GDSException
GDSException
public byte[] iscGetSegment(IscBlobHandle blob,
int maxread)
throws GDSException
GDS
blob - Handle to the blob from which a segment is to be fetchedmaxread - The maximum number of bytes to attempt to fetch
maxread
GDSException - if an error occurs while fetching the blob segment
public void iscOpenBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
throws GDSException
GDS
db_handle - Handle to the database in which the blob will be openedtr_handle - Handle to the transaction in which the blob will be openedblob_handle - Handle to the blob to be openedblobParameterBuffer - Contains parameters for the blob
GDSException - if an error occurs while opening the blob
public void iscPrepareTransaction(IscTrHandle tr_handle)
throws GDSException
GDSException
public void iscPrepareTransaction2(IscTrHandle tr_handle,
byte[] bytes)
throws GDSException
GDSException
public void iscPutSegment(IscBlobHandle blob_handle,
byte[] buffer)
throws GDSException
GDS
blob_handle - Handle to the blob to which data is to be writtenbuffer - Data to be written to the blob
GDSException - if an error occurs while writing to the blob
public void iscReconnectTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
long transactionId)
throws GDSException
GDS
tr_handle - transaction handle that will be reconnected.db_handle - database handle in which "in limbo" transaction will be
reconnected.transactionId - ID of the transaction to reconnect.
GDSException - if something went wrong.
public void iscRollbackRetaining(IscTrHandle tr_handle)
throws GDSException
GDSException
public void iscRollbackTransaction(IscTrHandle tr_handle)
throws GDSException
GDS
tr_handle - Handle to the transaction that is to be rolled back
GDSException - if an error occurs while rolling backGDS.iscCommitTransaction(IscTrHandle)
public byte[] iscTransactionInformation(IscTrHandle trHandle,
byte[] requestBuffer,
int bufferLen)
throws GDSException
GDSException
public void iscSeekBlob(IscBlobHandle handle,
int position,
int mode)
throws GDSException
GDSseekMode is used in
the same way as the system fseek call, i.e.:
position is the offset number of bytes to seek to,
relative to the position described by seekMode. Seeking
can only be done in a forward direction.
handle - Handle to the blob for which seeking will be doneposition - The offset number of bytes to seek tomode - Describes the base point to be used in seeking, should be
negative if seekMode is equal to 2
GDSException - if an error occurs while seeking
public void iscServiceAttach(String service,
IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer)
throws GDSException
GDS
service - The name/path to the service managerserviceHandle - Handle to be linked to the attached service managerserviceParameterBuffer - Contains parameters for attaching to the service manager
GDSException - if an error occurs while attaching
public void iscServiceDetach(IscSvcHandle serviceHandle)
throws GDSException
GDS
serviceHandle - Handle to the service manager that is to be detached
GDSException - if an error occurs while detaching
public void iscServiceQuery(IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
byte[] resultBuffer)
throws GDSException
GDS
serviceHandle - Handle to the service manager to be queriedserviceParameterBuffer - parameters about the serviceserviceRequestBuffer - parameters requested in the queryresultBuffer - buffer to hold the query results
GDSException - if an error occurs while querying
public void iscServiceStart(IscSvcHandle serviceHandle,
ServiceRequestBuffer serviceRequestBuffer)
throws GDSException
GDS
serviceHandle - Handle to the service manager where the operation is to be
startedserviceRequestBuffer - parameters about the service to be started
GDSException
public void iscStartTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
TransactionParameterBuffer tpb)
throws GDSException
GDS
tr_handle - Handle to the transaction that is to be starteddb_handle - Handle to the database in which the transaction is to be
startedtpb - Transaction Parameter Block in the form of a byte array,
contains parameter data for the transaction attributes
GDSException - if an error occurs while starting the transactionGDS.createIscTrHandle()
public int iscVaxInteger(byte[] buffer,
int pos,
int length)
GDS
buffer - The byte array from which the integer is to be retrievedpos - The offset starting position from which to start retrieving
byte valueslength - The number of bytes to use in retrieving the integer value.
public int iscVaxInteger2(byte[] buffer,
int pos)
public abstract void native_isc_attach_database(byte[] file_name,
IscDbHandle db_handle,
byte[] dpbBytes)
public abstract byte[] native_isc_blob_info(isc_blob_handle_impl handle,
byte[] items,
int buffer_length)
throws GDSException
GDSException
public abstract void native_isc_close_blob(IscBlobHandle blob)
throws GDSException
GDSException
public abstract void native_isc_commit_retaining(IscTrHandle tr_handle)
throws GDSException
GDSException
public abstract void native_isc_commit_transaction(IscTrHandle tr_handle)
throws GDSException
GDSException
public abstract void native_isc_create_blob2(IscDbHandle db,
IscTrHandle tr,
IscBlobHandle blob,
byte[] dpbBytes)
public abstract void native_isc_create_database(byte[] file_name,
IscDbHandle db_handle,
byte[] dpbBytes)
public abstract void native_isc_database_info(IscDbHandle db_handle,
int item_length,
byte[] items,
int buffer_length,
byte[] buffer)
throws GDSException
GDSException
public abstract void native_isc_detach_database(IscDbHandle db_handle)
throws GDSException
GDSException
public abstract void native_isc_drop_database(IscDbHandle db_handle)
throws GDSException
GDSException
public abstract void native_isc_dsql_alloc_statement2(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
throws GDSException
GDSException
public abstract void native_isc_dsql_allocate_statement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
throws GDSException
GDSException
public abstract XSQLDA native_isc_dsql_describe(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDSException
public abstract XSQLDA native_isc_dsql_describe_bind(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDSException
public abstract void native_isc_dsql_exec_immed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDSException
public abstract void native_isc_dsql_execute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDSException
public abstract boolean native_isc_dsql_fetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
throws GDSException
GDSException
public abstract void native_isc_dsql_free_statement(IscStmtHandle stmt_handle,
int option)
throws GDSException
GDSException
public abstract XSQLDA native_isc_dsql_prepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
throws GDSException
GDSException
public abstract void native_isc_dsql_set_cursor_name(IscStmtHandle stmt_handle,
String cursor_name,
int type)
throws GDSException
GDSException
public abstract byte[] native_isc_dsql_sql_info(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
throws GDSException
GDSException
public abstract byte[] native_isc_get_segment(IscBlobHandle blob,
int maxread)
throws GDSException
GDSException
public abstract void native_isc_open_blob2(IscDbHandle db,
IscTrHandle tr,
IscBlobHandle blob,
byte[] dpbBytes)
public abstract void native_isc_prepare_transaction(IscTrHandle tr_handle)
throws GDSException
GDSException
public abstract void native_isc_prepare_transaction2(IscTrHandle tr_handle,
byte[] bytes)
throws GDSException
GDSException
public abstract void native_isc_put_segment(IscBlobHandle blob_handle,
byte[] buffer)
throws GDSException
GDSException
public abstract void native_isc_rollback_retaining(IscTrHandle tr_handle)
throws GDSException
GDSException
public abstract void native_isc_rollback_transaction(IscTrHandle tr_handle)
throws GDSException
GDSException
public abstract void native_isc_seek_blob(isc_blob_handle_impl handle,
int position,
int mode)
throws GDSException
GDSException
public abstract void native_isc_service_attach(String service,
IscSvcHandle serviceHandle,
byte[] serviceParameterBuffer)
throws GDSException
GDSException
public abstract void native_isc_service_detach(IscSvcHandle serviceHandle)
throws GDSException
GDSException
public abstract void native_isc_service_query(IscSvcHandle serviceHandle,
byte[] sendServiceParameterBuffer,
byte[] requestServiceParameterBuffer,
byte[] resultBuffer)
throws GDSException
GDSException
public abstract void native_isc_service_start(IscSvcHandle serviceHandle,
byte[] serviceParameterBuffer)
throws GDSException
GDSException
public abstract void native_isc_start_transaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
byte[] tpb)
throws GDSException
GDSException
public abstract void native_isc_reconnect_transaction(IscDbHandle dbHandle,
IscTrHandle trHandle,
byte[] txId)
throws GDSException
GDSException
public abstract byte[] native_isc_transaction_info(IscTrHandle tr_handle,
byte[] items,
int bufferSize)
throws GDSException
GDSException
public abstract int native_isc_que_events(IscDbHandle db_handle,
EventHandleImp eventHandle,
EventHandler handler)
throws GDSException
GDSException
public abstract long native_isc_event_block(EventHandleImp eventHandle,
String eventNames)
throws GDSException
GDSException
public abstract void native_isc_event_counts(EventHandleImp eventHandle)
throws GDSException
GDSException
public abstract void native_isc_cancel_events(IscDbHandle db_handle,
EventHandleImp eventHandle)
throws GDSException
GDSExceptionpublic TransactionParameterBuffer newTransactionParameterBuffer()
GDSTransactionParameterBuffer instance for setting
transaction parameters in the current GDS implementation.
TransactionParameterBuffer.
public void readSQLData(XSQLDA xsqlda,
isc_stmt_handle_impl stmt)
protected byte[] getByteArrayForString(String statement,
String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected byte[] getZeroTerminatedArray(byte[] stringBytes)
public void getSqlCounts(IscStmtHandle stmt_handle)
throws GDSException
GDS
stmt_handle - Handle to the statement for which count data is to be
retrieved
GDSException - if an error occurs while retrieving the count data
public int iscQueueEvents(IscDbHandle dbHandle,
EventHandle eventHandle,
EventHandler eventHandler)
throws GDSException
GDS
dbHandle - Handle to the database where events are to be listened foreventHandle - Handle for event managementeventHandler - Callback to be called when an event occurs
GDSException - If a database communication error occurs
public void iscEventBlock(EventHandle eventHandle)
throws GDSException
GDSEventHandle.
eventHandle - The event handle to be initialized
GDSException - If a database communication error occurs
public void iscEventCounts(EventHandle eventHandle)
throws GDSException
GDS
eventHandle - The handle containing event data
GDSException - If a database communication error occurs
public void iscCancelEvents(IscDbHandle dbHandle,
EventHandle eventHandle)
throws GDSException
GDSEventHandle.
dbHandle - Handle to the database where events are being
listened foreventHandle - Datastructure for handling event data
GDSException - If a database communication error occurspublic EventHandle createEventHandle(String eventName)
GDSEventHandle specific to a given
GDS implementation.
EventHandle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||