public final class GDSHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BLOB_BUFFER_SIZE
Deprecated.
will be removed in Jaybird 6, use
PropertyConstants.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(BlobConfig blobConfig)
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.
|
IConnectionProperties |
getConnectionProperties() |
FbDatabase |
getCurrentDatabase() |
FbTransaction |
getCurrentTransaction() |
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 database that we're connected to.
|
int |
getDialect() |
java.lang.String |
getIscEncoding()
Deprecated.
Will be removed in Jaybird 6
|
java.util.TimeZone |
getSessionTimeZone()
Get the session time zone as configured in the connection property.
|
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
|
FbBlob |
openBlob(long blobId,
BlobConfig blobConfig)
Open a handle to a new blob within the current transaction with the given id.
|
void |
setCurrentTransaction(FbTransaction transaction) |
FbTransaction |
startTransaction(TransactionParameterBuffer tpb) |
LockCloseable |
withLock() |
@Deprecated public static final int DEFAULT_BLOB_BUFFER_SIZE
PropertyConstants.DEFAULT_BLOB_BUFFER_SIZE
public GDSHelper(FbDatabase database)
public FbTransaction getCurrentTransaction()
public void setCurrentTransaction(FbTransaction transaction)
public FbDatabase getCurrentDatabase()
public IConnectionProperties getConnectionProperties()
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 blobId, BlobConfig blobConfig) throws java.sql.SQLException
blobId
- the identifier to be given to the blobblobConfig
- blob configurationjava.sql.SQLException
- if a Firebird-specific database error occurspublic FbBlob createBlob(BlobConfig blobConfig) throws java.sql.SQLException
blobConfig
- blob configurationjava.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
public 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()
@Deprecated public java.lang.String getIscEncoding()
public java.util.TimeZone getSessionTimeZone()
NOTE: This is not necessarily the actual server time zone.
sessionTimeZone
public LockCloseable withLock()
FbAttachment.withLock()
Copyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.