public final class GDSHelper extends java.lang.Object implements Synchronizable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BLOB_BUFFER_SIZE |
Constructor and Description |
---|
GDSHelper(FbDatabase database)
Create instance of this class.
|
Modifier and Type | Method and Description |
---|---|
FbStatement |
allocateStatement()
Retrieve a newly allocated statement handle with the current connection.
|
void |
cancelOperation()
Cancel the currently running operation.
|
int |
compareToVersion(int major,
int minor)
Compares the version of this database to the specified major and
minor version.
|
FbBlob |
createBlob(boolean segmented)
Create a new blob within the current transaction.
|
void |
detachDatabase() |
void |
executeImmediate(java.lang.String statement)
Execute a SQL statement directly with the current connection.
|
int |
getBlobBufferLength()
Get the buffer length for blobs for this connection.
|
IConnectionProperties |
getConnectionProperties() |
FbDatabase |
getCurrentDatabase() |
FbTransaction |
getCurrentTransaction() |
DatabaseParameterBuffer |
getDatabaseParameterBuffer() |
int |
getDatabaseProductMajorVersion()
Get the major version number of the database that we're connected to.
|
int |
getDatabaseProductMinorVersion()
Get the minor version number of the database that we're connected to.
|
java.lang.String |
getDatabaseProductName()
Get the name of the database product that we're connected to.
|
java.lang.String |
getDatabaseProductVersion()
Get the version of the the database that we're connected to
|
int |
getDialect() |
java.lang.String |
getIscEncoding()
Get the encoding used for this connection.
|
java.lang.String |
getJavaEncoding() |
java.lang.String |
getMappingPath() |
java.lang.Object |
getSynchronizationObject()
Get synchronization object.
|
java.lang.String |
getUserName()
Get the database login name of the user that we're connected as.
|
boolean |
inTransaction()
Retrieve whether this connection is currently involved in a transaction
|
int |
iscVaxInteger(byte[] buffer,
int pos,
int length)
Deprecated.
Use
VaxEncoding.iscVaxInteger(byte[], int, int) . This method will be removed in Jaybird 4 |
long |
iscVaxLong(byte[] buffer,
int pos,
int length)
Deprecated.
Use
VaxEncoding.iscVaxLong(byte[], int, int) . This method will be removed in Jaybird 4 |
FbBlob |
openBlob(long blob_id,
boolean segmented)
Open a handle to a new blob within the current transaction with the given
id.
|
void |
setCurrentTransaction(FbTransaction transaction) |
FbTransaction |
startTransaction(TransactionParameterBuffer tpb) |
public static final int DEFAULT_BLOB_BUFFER_SIZE
public GDSHelper(FbDatabase database)
public FbTransaction getCurrentTransaction()
public void setCurrentTransaction(FbTransaction transaction)
public FbDatabase getCurrentDatabase()
public IConnectionProperties getConnectionProperties()
public DatabaseParameterBuffer getDatabaseParameterBuffer()
public int getDialect()
public FbStatement allocateStatement() throws java.sql.SQLException
java.sql.SQLException
- if a database access error occurspublic boolean inTransaction()
true
if this connection is currently in a
transaction, false
otherwise.public void executeImmediate(java.lang.String statement) throws java.sql.SQLException
statement
- The SQL statement to executejava.sql.SQLException
- if a Firebird-specific error occurspublic FbBlob openBlob(long blob_id, boolean segmented) throws java.sql.SQLException
blob_id
- The identifier to be given to the blobsegmented
- If true
, the blob will be segmented, otherwise
is will be streamedjava.sql.SQLException
- if a Firebird-specific database error occurspublic FbBlob createBlob(boolean segmented) throws java.sql.SQLException
segmented
- If true
the blob will be segmented, otherwise it will be streamedjava.sql.SQLException
- if a Firebird-specific database error occurspublic FbTransaction startTransaction(TransactionParameterBuffer tpb) throws java.sql.SQLException
java.sql.SQLException
public void detachDatabase() throws java.sql.SQLException
java.sql.SQLException
public void cancelOperation() throws java.sql.SQLException
java.sql.SQLException
@Deprecated public int iscVaxInteger(byte[] buffer, int pos, int length)
VaxEncoding.iscVaxInteger(byte[], int, int)
. This method will be removed in Jaybird 4@Deprecated public long iscVaxLong(byte[] buffer, int pos, int length)
VaxEncoding.iscVaxLong(byte[], int, int)
. This method will be removed in Jaybird 4public java.lang.String getDatabaseProductName()
public java.lang.String getDatabaseProductVersion()
public int getDatabaseProductMajorVersion()
public int getDatabaseProductMinorVersion()
public int compareToVersion(int major, int minor)
This method follows the semantics of Comparable
: returns a
negative value if the version of this database connection is smaller than
the supplied arguments, 0 if they are equal or positive if its bigger.
major
- Major version to compareminor
- Minor version to comparepublic java.lang.String getUserName()
public int getBlobBufferLength()
public java.lang.String getIscEncoding()
public java.lang.String getJavaEncoding()
public java.lang.String getMappingPath()
public java.lang.Object getSynchronizationObject()
Synchronizable
getSynchronizationObject
in interface Synchronizable
null
.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.