public interface FirebirdConnectionProperties
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthPlugins()
Get the list of authentication plugins to try.
|
int |
getBlobBufferSize() |
int |
getBuffersNumber() |
java.lang.String |
getCharSet() |
int |
getConnectTimeout()
Get the current connect timeout.
|
java.lang.String |
getDatabase() |
DatabaseParameterBuffer |
getDatabaseParameterBuffer()
Get the database parameter buffer corresponding to the current connection
request information.
|
java.lang.String |
getDataTypeBind()
Get the
dataTypeBind configuration. |
java.lang.String |
getDbCryptConfig()
Get the database encryption plugin configuration.
|
java.lang.String |
getDefaultIsolation()
Get the default transaction isolation level as string.
|
int |
getDefaultTransactionIsolation()
Get the default transaction isolation level.
|
java.lang.String |
getEncoding() |
java.lang.String |
getGeneratedKeysEnabled()
Get the
generatedKeysEnabled configuration. |
java.lang.String |
getNonStandardProperty(java.lang.String key)
Get the property that does not have corresponding getter method by its
name.
|
java.lang.String |
getPassword() |
java.lang.String |
getRoleName() |
java.lang.String |
getSessionTimeZone()
Get the
sessionTimeZone . |
int |
getSocketBufferSize() |
int |
getSoTimeout()
Get the current Socket blocking timeout (SoTimeout).
|
java.lang.String |
getSqlDialect() |
java.lang.String |
getTpbMapping()
Get the used TPB mapping.
|
TransactionParameterBuffer |
getTransactionParameters(int isolation)
Get the transaction parameter buffer corresponding to the current
connection request information.
|
java.lang.String |
getType() |
java.lang.String |
getUserName() |
java.lang.String |
getWireCrypt()
Get the wire encryption level value.
|
boolean |
isDefaultResultSetHoldable()
Get the default ResultSet holdability.
|
boolean |
isIgnoreProcedureType()
Get the value for
ignoreProcedureType . |
boolean |
isTimestampUsesLocalTimezone() |
boolean |
isUseFirebirdAutocommit()
Get whether to use Firebird autocommit (experimental).
|
boolean |
isUseStandardUdf() |
boolean |
isUseStreamBlobs() |
boolean |
isWireCompression()
Get if wire compression should be enabled.
|
void |
setAuthPlugins(java.lang.String authPlugins)
Sets the authentication plugins to try.
|
void |
setBlobBufferSize(int bufferSize) |
void |
setBuffersNumber(int buffersNumber) |
void |
setCharSet(java.lang.String charSet) |
void |
setConnectTimeout(int connectTimeout)
Set the connect timeout.
|
void |
setDatabase(java.lang.String database) |
void |
setDataTypeBind(java.lang.String dataTypeBind)
Sets the
dataTypeBind configuration. |
void |
setDbCryptConfig(java.lang.String dbCryptConfig)
Sets the database encryption plugin configuration.
|
void |
setDefaultIsolation(java.lang.String isolation)
Set the default transaction isolation level as string.
|
void |
setDefaultResultSetHoldable(boolean isHoldable)
Sets the default ResultSet holdability.
|
void |
setDefaultTransactionIsolation(int defaultIsolationLevel)
Set the default transaction isolation level.
|
void |
setEncoding(java.lang.String encoding) |
void |
setGeneratedKeysEnabled(java.lang.String generatedKeysEnabled)
Sets the
generatedKeysEnabled configuration. |
void |
setIgnoreProcedureType(boolean ignoreProcedureType)
Sets the value
ignoreProcedureType . |
void |
setNonStandardProperty(java.lang.String propertyMapping)
Set the property that does not have corresponding setter method.
|
void |
setNonStandardProperty(java.lang.String key,
java.lang.String value)
Set the property that does not have corresponding setter method.
|
void |
setPassword(java.lang.String password) |
void |
setRoleName(java.lang.String roleName) |
void |
setSessionTimeZone(java.lang.String sessionTimeZone)
Sets the
sessionTimeZone . |
void |
setSocketBufferSize(int socketBufferSize) |
void |
setSoTimeout(int soTimeout)
Set the Socket blocking timeout (SoTimeout).
|
void |
setSqlDialect(java.lang.String sqlDialect) |
void |
setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone) |
void |
setTpbMapping(java.lang.String tpbMapping)
Set path to the properties file with the TPB mapping.
|
void |
setTransactionParameters(int isolation,
TransactionParameterBuffer tpb)
Set transaction parameters for the specified transaction isolation level.
|
void |
setType(java.lang.String type) |
void |
setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
Set whether to use Firebird autocommit (experimental).
|
void |
setUserName(java.lang.String userName) |
void |
setUseStandardUdf(boolean useStandardUdf) |
void |
setUseStreamBlobs(boolean useStreamBlobs) |
void |
setWireCompression(boolean wireCompression)
Sets if the connection should try to enable wire compression.
|
void |
setWireCrypt(java.lang.String wireCrypt)
Sets the wire encryption level.
|
java.lang.String getDatabase()
void setDatabase(java.lang.String database)
database
- path to the database including the server name and the
port, if needed.java.lang.String getType()
void setType(java.lang.String type)
type
- type of the connection, for example, "PURE_JAVA", "LOCAL",
"EMBEDDED", depends on the GDS implementations installed in the system.int getBlobBufferSize()
void setBlobBufferSize(int bufferSize)
bufferSize
- size of the BLOB buffer in bytes.java.lang.String getCharSet()
setCharSet(String)
void setCharSet(java.lang.String charSet)
charSet
- Character set for the connection. Similar to
encoding
property, but accepts Java names
instead of Firebird ones.java.lang.String getEncoding()
setEncoding(String)
void setEncoding(java.lang.String encoding)
encoding
- Character encoding for the connection. See Firebird
documentation for more information.java.lang.String getRoleName()
void setRoleName(java.lang.String roleName)
roleName
- SQL role to use.java.lang.String getSqlDialect()
void setSqlDialect(java.lang.String sqlDialect)
sqlDialect
- SQL dialect of the client.boolean isUseStreamBlobs()
true
if stream blobs should be created, otherwise
false
.void setUseStreamBlobs(boolean useStreamBlobs)
useStreamBlobs
- true
if stream blobs should be created,
otherwise false
.boolean isUseStandardUdf()
true
if driver should assume that standard UDF are
installed.void setUseStandardUdf(boolean useStandardUdf)
useStandardUdf
- true
if driver should assume that standard UDF
are installed.int getSocketBufferSize()
void setSocketBufferSize(int socketBufferSize)
socketBufferSize
- socket buffer size in bytes.boolean isTimestampUsesLocalTimezone()
true
if the Jaybird 1.0 handling of the calendar
in corresponding setters. This is also compatible with MySQL
calendar treatment.void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
timestampUsesLocalTimezone
- true
if the Jaybird 1.0 handling of the
calendar in corresponding setters. This is also compatible
with MySQL calendar treatment.java.lang.String getUserName()
void setUserName(java.lang.String userName)
userName
- name of the user that will be used when connecting to the database.java.lang.String getPassword()
void setPassword(java.lang.String password)
password
- password corresponding to the specified user name.int getBuffersNumber()
void setBuffersNumber(int buffersNumber)
buffersNumber
- number of cache buffers that should be allocated for this
connection, should be specified for ClassicServer instances,
SuperServer has a server-wide configuration parameter.java.lang.String getNonStandardProperty(java.lang.String key)
key
- name of the property to get.void setNonStandardProperty(java.lang.String key, java.lang.String value)
key
- name of the property to set.value
- value of the property.void setNonStandardProperty(java.lang.String propertyMapping)
propertyMapping
- parameter value in the ?propertyName[=propertyValue]? form,
this allows setting non-standard parameters using
configuration files.DatabaseParameterBuffer getDatabaseParameterBuffer() throws java.sql.SQLException
DatabaseParameterBuffer
.java.sql.SQLException
- if database parameter buffer cannot be created.java.lang.String getTpbMapping()
setTpbMapping(String)
void setTpbMapping(java.lang.String tpbMapping)
"res:"
should be used to specify resource
in the classpath.
For the compatibility reasons, if no protocol is specified, classpath is
used by default.
Properties file contains a mapping between the transaction isolation
level (name of the constant in the Connection
interface
and a comma-separated list of TPB parameters.tpbMapping
- path to the properties file.int getDefaultTransactionIsolation()
void setDefaultTransactionIsolation(int defaultIsolationLevel)
defaultIsolationLevel
- default transaction isolation level.java.lang.String getDefaultIsolation()
getDefaultTransactionIsolation()
, however
it takes a string as parameter instead of a numeric constant.setDefaultIsolation(String)
void setDefaultIsolation(java.lang.String isolation)
setDefaultTransactionIsolation(int)
,
however it takes a string as parameter instead of a numeric constant.
Following strings are allowed:
"TRANSACTION_READ_COMMITTED"
for a READ COMMITTED
isolation level.
"TRANSACTION_REPEATABLE_READ"
for a REPEATABLE READ
isolation level.
"TRANSACTION_SERIALIZABLE"
for a SERIALIZABLE
isolation level.
isolation
- string constant representing a default isolation level.TransactionParameterBuffer getTransactionParameters(int isolation)
isolation
- transaction isolation level for which TPB should be returned.TransactionParameterBuffer
.void setTransactionParameters(int isolation, TransactionParameterBuffer tpb)
isolation
- transaction isolation level.tpb
- instance of TransactionParameterBuffer
containing
transaction parameters.boolean isDefaultResultSetHoldable()
true
when ResultSets are holdable by default, false
not holdable.void setDefaultResultSetHoldable(boolean isHoldable)
isHoldable
- true
when ResultSets are holdable by default, false
not holdable.int getSoTimeout()
void setSoTimeout(int soTimeout)
soTimeout
- Timeout in milliseconds (0 is 'infinite')int getConnectTimeout()
void setConnectTimeout(int connectTimeout)
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)boolean isUseFirebirdAutocommit()
true
use Firebird autocommitvoid setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
useFirebirdAutocommit
- true
Use Firebird autocommitjava.lang.String getWireCrypt()
null
implies DEFAULT
)void setWireCrypt(java.lang.String wireCrypt)
Values are defined by WireCrypt
, values are handled case insensitive.
Invalid values are accepted, but will cause an error when a connection is established.
wireCrypt
- Wire encryption leveljava.lang.String getDbCryptConfig()
void setDbCryptConfig(java.lang.String dbCryptConfig)
dbCryptConfig
- Database encryption plugin configuration, meaning plugin specificjava.lang.String getAuthPlugins()
null
for driver defaultvoid setAuthPlugins(java.lang.String authPlugins)
Invalid names are skipped during authentication.
authPlugins
- comma-separated list of authentication plugins, or null
for driver defaultjava.lang.String getGeneratedKeysEnabled()
generatedKeysEnabled
configuration.generatedKeysEnabled
, or null
for driver defaultvoid setGeneratedKeysEnabled(java.lang.String generatedKeysEnabled)
generatedKeysEnabled
configuration.generatedKeysEnabled
- Generated keys support configuration: default
(or null/empty), disabled
, ignored
,
or a list of statement types to enable (possible values: insert
, update
, delete
,
update_or_insert
, merge
)java.lang.String getDataTypeBind()
dataTypeBind
configuration.dataTypeBind
, or null
for driver defaultvoid setDataTypeBind(java.lang.String dataTypeBind)
dataTypeBind
configuration.
If the value is explicitly set to a non-null value and the connected server is Firebird 4 or higher, this will
configure the data type binding with the specified values using isc_dpb_set_bind
, which is equivalent to
executing SET BIND
statements with the values.
See also Firebird documentation for SET BIND
.
dataTypeBind
- Firebird 4+ data type bind configuration, a semicolon-separated list of <from-type> TO <to-type>
java.lang.String getSessionTimeZone()
sessionTimeZone
.sessionTimeZone
, or null
for driver default (JVM default time zone)void setSessionTimeZone(java.lang.String sessionTimeZone)
sessionTimeZone
.sessionTimeZone
- Firebird 4+ session time zone name (we strongly suggest to use Java compatible names only),
use "server"
to use server default time zone (note: conversion will use JVM default time zone)boolean isIgnoreProcedureType()
ignoreProcedureType
.ignoreProcedureType
void setIgnoreProcedureType(boolean ignoreProcedureType)
ignoreProcedureType
.
When set to true, the CallableStatement
implementation in Jaybird will ignore metadata
information about the stored procedure type and default to using EXECUTE PROCEDURE
, unless the type is
explicitly set using FirebirdCallableStatement.setSelectableProcedure(boolean)
. This can be useful in
situations where a stored procedure is selectable, but tooling or code expects an executable stored procedure.
ignoreProcedureType
- true
Ignore procedure typeboolean isWireCompression()
Wire compression requires Firebird 3 or higher, and the server must have the zlib library. If compression cannot be negotiated, the connection will be made without wire compression.
This property will be ignored for native connections. For native connections, the configuration in
firebird.conf
read by the client library will be used.
true
wire compression enabledvoid setWireCompression(boolean wireCompression)
wireCompression
- true
enable wire compression, false
disable wire compression (the default)isWireCompression()
Copyright © 2001-2020 Jaybird (Firebird JDBC/JCA) team. All rights reserved.