Interface DatabaseConnectionProperties
- 
- All Superinterfaces:
- AttachmentProperties,- BaseProperties
 - All Known Subinterfaces:
- FirebirdConnectionProperties,- IConnectionProperties
 - All Known Implementing Classes:
- AbstractConnectionPropertiesDataSource,- FBAbstractCommonDataSource,- FBConnectionPoolDataSource,- FbConnectionProperties,- FBConnectionProperties,- FbImmutableConnectionProperties,- FBManagedConnectionFactory,- FBSimpleDataSource,- FBXADataSource
 
 public interface DatabaseConnectionProperties extends AttachmentProperties Properties for database connections.- Since:
- 5
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default intgetBlobBufferSize()default java.lang.StringgetDatabaseName()Gets the database of the connection.default java.lang.StringgetDataTypeBind()Get thedataTypeBindconfiguration.default java.lang.StringgetDecfloatRound()default java.lang.StringgetDecfloatTraps()default java.lang.StringgetDefaultIsolation()Get the default transaction isolation level as string.default intgetDefaultTransactionIsolation()Get the default transaction isolation level.default java.lang.StringgetGeneratedKeysEnabled()Get thegeneratedKeysEnabledconfiguration.default intgetMaxBlobCacheSize()default intgetMaxInlineBlobSize()default intgetPageCacheSize()Get the page cache size.default java.lang.StringgetScrollableCursor()default intgetServerBatchBufferSize()default java.lang.StringgetSessionTimeZone()Get thesessionTimeZone.default intgetSqlDialect()default java.lang.StringgetTpbMapping()Get the used TPB mapping.default booleanisColumnLabelForName()Gets the current setting ofcolumnLabelForNamedefault booleanisDefaultResultSetHoldable()Get whether ResultSets are holdable by default.default booleanisExtendedMetadata()default booleanisIgnoreProcedureType()Get the value forignoreProcedureType.default booleanisTimestampUsesLocalTimezone()Deprecated.This property has unclear semantics and will be removed in Jaybird 6default booleanisUseFirebirdAutocommit()Get whether to use Firebird autocommit (experimental).default booleanisUseServerBatch()default booleanisUseStreamBlobs()default voidsetBlobBufferSize(int blobBufferSize)default voidsetColumnLabelForName(boolean columnLabelForName)Set ifResultSetMetaData.getColumnName(int)returns thecolumnLabelinstead of thecolumnName.default voidsetDatabaseName(java.lang.String databaseName)Sets the database of the connectiondefault voidsetDataTypeBind(java.lang.String dataTypeBind)Sets thedataTypeBindconfiguration.default voidsetDecfloatRound(java.lang.String decfloatRound)Sets theDECFLOATrounding modedefault voidsetDecfloatTraps(java.lang.String decfloatTraps)Sets theDECFLOATerror traps.default voidsetDefaultIsolation(java.lang.String isolation)Set the default transaction isolation level as string.default voidsetDefaultResultSetHoldable(boolean defaultResultSetHoldable)Set ifResultSetshould beResultSet.HOLD_CURSORS_OVER_COMMITby default.default voidsetDefaultTransactionIsolation(int defaultIsolationLevel)Set the default transaction isolation level.default voidsetExtendedMetadata(boolean extendedMetadata)Sets if certain metadata classes will perform additional queries to enrich the information for certain types.default voidsetGeneratedKeysEnabled(java.lang.String generatedKeysEnabled)Sets thegeneratedKeysEnabledconfiguration.default voidsetIgnoreProcedureType(boolean ignoreProcedureType)Sets the valueignoreProcedureType.default voidsetMaxBlobCacheSize(int maxBlobCacheSize)Sets the maximum inline blob cache size.default voidsetMaxInlineBlobSize(int maxInlineBlobSize)Sets the maximum inline blob size.default voidsetPageCacheSize(int pageCacheSize)Set the page cache size.default voidsetScrollableCursor(java.lang.String scrollableCursor)Sets the type of scrollable cursor.default voidsetServerBatchBufferSize(int serverBatchBufferSize)Sets the server batch buffer size (if server batch is supported and enabled).default voidsetSessionTimeZone(java.lang.String sessionTimeZone)Sets thesessionTimeZone.default voidsetSqlDialect(int sqlDialect)default voidsetTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)Deprecated.This property has unclear semantics and will be removed in Jaybird 6default voidsetTpbMapping(java.lang.String tpbMapping)Set path to the properties file with the TPB mapping.default voidsetUseFirebirdAutocommit(boolean useFirebirdAutocommit)Set whether to use Firebird autocommit (experimental).default voidsetUseServerBatch(boolean useServerBatch)Sets whether to use server-side batch support, if available.default voidsetUseStreamBlobs(boolean useStreamBlobs)- 
Methods inherited from interface org.firebirdsql.jaybird.props.AttachmentPropertiesgetAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getType, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setType, setUser, setWireCompression, setWireCrypt
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.BasePropertiesconnectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty
 
- 
 
- 
- 
- 
Method Detail- 
getDatabaseNamedefault java.lang.String getDatabaseName() Gets the database of the connection.- Returns:
- database name
- See Also:
- setDatabaseName(String)
 
 - 
setDatabaseNamedefault void setDatabaseName(java.lang.String databaseName) Sets the database of the connectionWhen serverNameisnull, the value is taken as the URL of the database, and exact interpretation depends on the protocol implementation (type). Basically, the URL would be the JDBC URL, but without thejdbc:firebird[sql]:[subprotocol:]prefix and without connection properties. Examples:- //localhost/employee — PURE_JAVA, OOREMOTE, NATIVE (for NATIVE, this format is parsed and transformed to the next example)
- localhost:employee — NATIVE, PURE_JAVA, OOREMOTE
- //localhost:3051/employee — PURE_JAVA, OOREMOTE, NATIVE (for NATIVE, this format is parsed and transformed to the next example)
- localhost/3051:employee — NATIVE, PURE_JAVA, OOREMOTE
- /path/to/your.fdb — NATIVE, EMBEDDED, PURE_JAVA, OOREMOTE (PURE_JAVA and OOREMOTE will use localhost
 as serverName, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)
- C:\path\to\your.fdb — NATIVE, EMBEDDED (protocols like PURE_JAVA may attempt to connect to a server
 called C, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)
- C:/path/to/your.fdb — NATIVE, EMBEDDED (protocols like PURE_JAVA may attempt to connect to a server
 called C, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)
- xnet://employee — NATIVE (EMBEDDED will behave as NATIVE, protocols like PURE_JAVA may
 attempt to connect to a server called xnet)
- other Firebird fbclientconnection URLs — NATIVE (EMBEDDED will behave as NATIVE, protocols like PURE_JAVA may interpret the protocol name as a host name
- Custom typeimplementations may support other URL formats
 Some protocols, for example PURE_JAVA, when serverNameis not set, butdatabaseNamedoesn't seem to contain a host name, may default to attempting to connect to localhost withdatabaseNameas the database path or alias.When serverNameis set, the value is taken as the database path or alias. Examples:- employee
- /path/to/your.fdb
- C:\path\to\your.fdb
- C:/path/to/your.fdb
- relative/path/to/your.fdb — not recommended
 - Parameters:
- databaseName- database name
 
 - 
getSqlDialectdefault int getSqlDialect() - Returns:
- SQL dialect of the client connection
 
 - 
setSqlDialectdefault void setSqlDialect(int sqlDialect) - Parameters:
- sqlDialect- SQL dialect of the client connection.
 
 - 
getPageCacheSizedefault int getPageCacheSize() Get the page cache size.A value of 0indicates that the value is not set, and that the server default is used.This option is only relevant for Firebird implementations with per connection cache (eg Classic) NOTE: Implementer should take care to return 0if the value hasn't been set yet.- Returns:
- size of cache in pages for this connection, can be specified for Classic and SuperClassic instances, ignored for SuperServer as the cache is shared; 0 when not set
 
 - 
setPageCacheSizedefault void setPageCacheSize(int pageCacheSize) Set the page cache size.A value of 0indicates that the value is not set, and that the server default is used.This option is only relevant for Firebird implementations with per connection cache (eg Classic). - Parameters:
- pageCacheSize- size of cache in pages for this connection, can be specified for Classic and SuperClassic instances ignored for SuperServer as the cache is shared.
 
 - 
getDataTypeBinddefault java.lang.String getDataTypeBind() Get thedataTypeBindconfiguration.- Returns:
- configuration value for dataTypeBind, ornullfor driver default
- Since:
- 4.0
 
 - 
setDataTypeBinddefault void setDataTypeBind(java.lang.String dataTypeBind) Sets thedataTypeBindconfiguration.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 executingSET BINDstatements with the values.See also Firebird documentation for SET BIND.- Parameters:
- dataTypeBind- Firebird 4+ data type bind configuration, a semicolon-separated list of- <from-type> TO <to-type>
- Since:
- 4.0
 
 - 
getSessionTimeZonedefault java.lang.String getSessionTimeZone() Get thesessionTimeZone.- Returns:
- value for sessionTimeZone, ornullfor driver default (JVM default time zone)
- Since:
- 4.0
 
 - 
setSessionTimeZonedefault void setSessionTimeZone(java.lang.String sessionTimeZone) Sets thesessionTimeZone.- Parameters:
- 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)
- Since:
- 4.0
 
 - 
getBlobBufferSizedefault int getBlobBufferSize() - Returns:
- BLOB buffer size in bytes; if the configured value is less than an implementation-specific minimum, that minimum is returned
 
 - 
setBlobBufferSizedefault void setBlobBufferSize(int blobBufferSize) - Parameters:
- blobBufferSize- size of the BLOB buffer in bytes
 
 - 
isUseStreamBlobsdefault boolean isUseStreamBlobs() - Returns:
- trueif stream blobs should be created, otherwise- false.
 
 - 
setUseStreamBlobsdefault void setUseStreamBlobs(boolean useStreamBlobs) - Parameters:
- useStreamBlobs-- trueif stream blobs should be created, otherwise- false.
 
 - 
isDefaultResultSetHoldabledefault boolean isDefaultResultSetHoldable() Get whether ResultSets are holdable by default.- Returns:
- trueResultSets by default are- ResultSet.HOLD_CURSORS_OVER_COMMIT,- false(default), ResultSets are- ResultSet.CLOSE_CURSORS_AT_COMMIT
 
 - 
setDefaultResultSetHoldabledefault void setDefaultResultSetHoldable(boolean defaultResultSetHoldable) Set ifResultSetshould beResultSet.HOLD_CURSORS_OVER_COMMITby default.- Parameters:
- defaultResultSetHoldable-- trueResultSets are holdable,- false(default) ResultSets are- ResultSet.CLOSE_CURSORS_AT_COMMIT
 
 - 
isUseFirebirdAutocommitdefault boolean isUseFirebirdAutocommit() Get whether to use Firebird autocommit (experimental).- Returns:
- trueuse Firebird autocommit
- Since:
- 2.2.9
 
 - 
setUseFirebirdAutocommitdefault void setUseFirebirdAutocommit(boolean useFirebirdAutocommit) Set whether to use Firebird autocommit (experimental).- Parameters:
- useFirebirdAutocommit-- trueUse Firebird autocommit
- Since:
- 2.2.9
 
 - 
isColumnLabelForNamedefault boolean isColumnLabelForName() Gets the current setting ofcolumnLabelForName- Returns:
- falseJDBC compliant behavior (- columnNameis returned),- truecompatibility option (- columnLabelis returned)
- Since:
- 2.2.1
- See Also:
- setColumnLabelForName(boolean)
 
 - 
setColumnLabelForNamedefault void setColumnLabelForName(boolean columnLabelForName) Set ifResultSetMetaData.getColumnName(int)returns thecolumnLabelinstead of thecolumnName.The default behaviour (with columnLabelForName=falseis JDBC-compliant. The behavior for valuetrueis to provide compatibility with tools with a wrong expectation.- Parameters:
- columnLabelForName-- falseJDBC compliant behavior (- columnNameis returned),- truecompatibility option (- columnLabelis returned)
- Since:
- 2.2.1
 
 - 
getGeneratedKeysEnableddefault java.lang.String getGeneratedKeysEnabled() Get thegeneratedKeysEnabledconfiguration.- Returns:
- configuration value for generatedKeysEnabled, ornullfor driver default
- Since:
- 4.0
 
 - 
setGeneratedKeysEnableddefault void setGeneratedKeysEnabled(java.lang.String generatedKeysEnabled) Sets thegeneratedKeysEnabledconfiguration.- Parameters:
- 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)
- Since:
- 4.0
 
 - 
isIgnoreProcedureTypedefault boolean isIgnoreProcedureType() Get the value forignoreProcedureType.- Returns:
- value for ignoreProcedureType
- Since:
- 3.0.6
 
 - 
setIgnoreProcedureTypedefault void setIgnoreProcedureType(boolean ignoreProcedureType) Sets the valueignoreProcedureType.When set to true, the CallableStatementimplementation in Jaybird will ignore metadata information about the stored procedure type and default to usingEXECUTE PROCEDURE, unless the type is explicitly set usingFirebirdCallableStatement.setSelectableProcedure(boolean). This can be useful in situations where a stored procedure is selectable, but tooling or code expects an executable stored procedure.- Parameters:
- ignoreProcedureType-- trueIgnore procedure type
- Since:
- 3.0.6
 
 - 
getDecfloatRounddefault java.lang.String getDecfloatRound() - Returns:
- the server-side DECFLOATrounding mode,nullapplies the Firebird server default
 
 - 
setDecfloatRounddefault void setDecfloatRound(java.lang.String decfloatRound) Sets theDECFLOATrounding mode- Parameters:
- decfloatRound- Firebird 4+ server-side- DECFLOATrounding mode (- ceiling, up, half_up, half_even, half_down, down, floor, reround);- nullto apply the Firebird server default (- half_upin Firebird 4)
 
 - 
getDecfloatTrapsdefault java.lang.String getDecfloatTraps() - Returns:
- the server-side DECFLOATerror traps,nullapplies the Firebird server default
 
 - 
setDecfloatTrapsdefault void setDecfloatTraps(java.lang.String decfloatTraps) Sets theDECFLOATerror traps.- Parameters:
- decfloatTraps- Firebird 4+ server-side- DECFLOATerror traps; comma-separated list with options- Division_by_zero, Inexact, Invalid_operation, Overflow, Underflow;- nullto apply Firebird server default (- Division_by_zero,Invalid_operation,Overflowin Firebird 4)
 
 - 
getTpbMappingdefault java.lang.String getTpbMapping() Get the used TPB mapping.- Returns:
- path to the TPB mapping
- See Also:
- setTpbMapping(String)
 
 - 
setTpbMappingdefault void setTpbMapping(java.lang.String tpbMapping) Set path to the properties file with the TPB mapping. The path begins with the protocol specification followed by the path to the resource. A special protocol"res:"should be used to specify resource in the classpath. For 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 theConnectioninterface and a comma-separated list of TPB parameters).- Parameters:
- tpbMapping- path to the properties file
- Throws:
- java.lang.IllegalStateException- May be thrown when the mapping has already been initialized (not all implementations do this)
 
 - 
getDefaultTransactionIsolationdefault int getDefaultTransactionIsolation() Get the default transaction isolation level. This is the transaction isolation level for the newly created connections.- Returns:
- default transaction isolation level.
 
 - 
setDefaultTransactionIsolationdefault void setDefaultTransactionIsolation(int defaultIsolationLevel) Set the default transaction isolation level.- Parameters:
- defaultIsolationLevel- default transaction isolation level.
 
 - 
getDefaultIsolationdefault java.lang.String getDefaultIsolation() Get the default transaction isolation level as string. This method is complementary togetDefaultTransactionIsolation(), however it returns a string name instead of a numeric constant.- Returns:
- default transaction isolation as string.
- See Also:
- setDefaultIsolation(String)
 
 - 
setDefaultIsolationdefault void setDefaultIsolation(java.lang.String isolation) Set the default transaction isolation level as string. This method is complementary tosetDefaultTransactionIsolation(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.
- Integer string values matching the isolation levels
 - Parameters:
- isolation- string constant representing a default isolation level.
 
 - 
isTimestampUsesLocalTimezone@Deprecated default boolean isTimestampUsesLocalTimezone() Deprecated.This property has unclear semantics and will be removed in Jaybird 6- Returns:
- trueif the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.
 
 - 
setTimestampUsesLocalTimezone@Deprecated default void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone) Deprecated.This property has unclear semantics and will be removed in Jaybird 6Sets the valuetimestampUsesLocalTimezone.- Parameters:
- timestampUsesLocalTimezone-- trueif the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.
 
 - 
getScrollableCursordefault java.lang.String getScrollableCursor() - Returns:
- Configuration of scrollable cursors, either EMULATED(default) orSERVER(case-insensitive)
- See Also:
- setScrollableCursor(String)
 
 - 
setScrollableCursordefault void setScrollableCursor(java.lang.String scrollableCursor) Sets the type of scrollable cursor.Possible values are (case-insensitive): - EMULATED(default) - emulate scrollable cursors in memory by fetching all rows
- SERVER- user server-side scrollable cursor (requires Firebird 5.0 and pure-java connection). Falls back to- EMULATEDbehaviour when server-side support is not available, or when holdable cursors are requested
 - Parameters:
- scrollableCursor- Scrollable cursor type, one of- EMULATEDor- SERVER(case-insensitive)
 
 - 
isUseServerBatchdefault boolean isUseServerBatch() - Returns:
- true(default) use server-side batch if supported by server,- falsealways use emulated batch
- See Also:
- setUseServerBatch(boolean)
 
 - 
setUseServerBatchdefault void setUseServerBatch(boolean useServerBatch) Sets whether to use server-side batch support, if available.Currently, server-side batch is only supported with Firebird 4.0 or higher, with a pure Java connection, using a PreparedStatement, but not aCallableStatement, and only when not requesting generated keys.The implementation will fall back to emulated batches if either the server version doesn't support batches, or if the statement cannot be executed using the server-side batch mechanism for other reasons (e.g. requesting generated keys). - Parameters:
- useServerBatch-- true, use server-side batch support if possible,- falsealways use emulated batch
 
 - 
getServerBatchBufferSizedefault int getServerBatchBufferSize() - Returns:
- batch buffer size in bytes, < 0to use server-side default (16MB as of Firebird 4.0),0(default) to use server-side maximum (256MB as of Firebird 4.0), values exceeding server-side maximum will set server-side maximum
- See Also:
- setServerBatchBufferSize(int)
 
 - 
setServerBatchBufferSizedefault void setServerBatchBufferSize(int serverBatchBufferSize) Sets the server batch buffer size (if server batch is supported and enabled).- Parameters:
- serverBatchBufferSize- server batch buffer size in bytes, use- < 0to set server-side default (16MB as of Firebird 4.0), use- 0to use server-side maximum (256MB as of Firebird 4.0), values exceeding server-side maximum will set server-side maximum
 
 - 
isExtendedMetadatadefault boolean isExtendedMetadata() - Returns:
- true(default) if metadata (e.g.- ResultSetMetaData) will perform additional queries for more detailed information,- falseif only the available bind information will be used
- Since:
- 5.0.5
- See Also:
- setExtendedMetadata(boolean)
 
 - 
setExtendedMetadatadefault void setExtendedMetadata(boolean extendedMetadata) Sets if certain metadata classes will perform additional queries to enrich the information for certain types.Currently this is used only by ResultSetMetaDatafor itsgetPrecisionandisAutoIncrementmethods. If disabled, these methods will return an estimated precision, orfalsefor auto-increment instead of actual precision and identity column state information.Disabling this setting may improve performance of querying metadata information, in exchange for less precise information. - Parameters:
- extendedMetadata-- true(default) - metadata (e.g.- ResultSetMetaData) will perform additional queries for more detailed information,- false- only the available bind information will be used
- Since:
- 5.0.5
 
 - 
getMaxInlineBlobSizedefault int getMaxInlineBlobSize() - Returns:
- the maximum inline blob size (native connections will use their own default if it was not explicitly set)
- Since:
- 5.0.8
- See Also:
- setMaxInlineBlobSize(int)
 
 - 
setMaxInlineBlobSizedefault void setMaxInlineBlobSize(int maxInlineBlobSize) Sets the maximum inline blob size. This controls the maximum size of a blob (including segment lengths) that Firebird will send inline on fetch or execute.This only applies to Firebird 5.0.3 or higher. Default value is 64 KiB. Native connections will use their own default if it was not explicitly set. The default value can be overridden by setting system property org.firebirdsql.jdbc.defaultMaxInlineBlobSize.- Parameters:
- maxInlineBlobSize- maximum inline blob size, a value of- 0will disable sending inline blobs, values greater than 65535 will be effectively ignored (this is not enforced, so if Firebird introduces support for larger values, it will work); negative values will set- 0.
- Since:
- 5.0.8
 
 - 
getMaxBlobCacheSizedefault int getMaxBlobCacheSize() - Returns:
- the maximum blob cache size in bytes (native connections will use their own default if it was not explicitly set)
- Since:
- 5.0.8
- See Also:
- setMaxBlobCacheSize(int)
 
 - 
setMaxBlobCacheSizedefault void setMaxBlobCacheSize(int maxBlobCacheSize) Sets the maximum inline blob cache size. This controls the size of the cache to store inline blobs. Only the actual blob length counts towards the cache size.This only applies to Firebird 5.0.3 or higher. Default value is 10 MiB. Native connections will use their own default if it was not explicitly set. The default value can be overridden by setting system property org.firebirdsql.jdbc.defaultMaxBlobCacheSize.Disabling the cache by setting it to 0will not disable inline blobs; make sure you also setsetMaxInlineBlobSize(int)to0to avoid unnecessary data transfer.- Parameters:
- maxBlobCacheSize- the maximum blob cache size in bytes, a value of- 0will disable the cache; negative values will set- 0
- Since:
- 5.0.8
 
 
- 
 
-