Class: com.sybase.djc.sql.DatabaseType (Database Type) | EAServer 6.3 Help |
---|
Description |
A database type defines configuration properties for a
particular type of database. Many of these properties
are used as default values for
data source
properties, which makes data source definition less
verbose. Other properties are used for database-specific
object-relational mapping when using container-managed persistence.
See also: map. |
---|---|
Configuration | See Set Properties Task. |
Properties | afterInsert, batchDelimiter, blobUpdater, checkDelete, checkUpdate, clobUpdater, compactColumnAlias, dataSourceClass, databaseName, databaseURL, disablePrefetch, disableTriggers, driverClass, driverDebug, driverDebugSettings, getDateAndTime, isDownloadZipped, jdbcDriverDownloadURL, networkProtocol, password, pingSQL, portNumber, psMaximumBlobLength, psMaximumClobLength, roleName, selectWithSharedLock, selectWithUpdateLock, serializableSelect, serverName, serviceName, truncateNanos, useQuotedIdentifiers, user, xaDataSourceClass |
Files | Repository/Instance/com/sybase/djc/sql/DatabaseType/*.properties |
Property: afterInsert (After Insert SQL) | |
---|---|
Description | The value "into" if a database requires the use of "insert into ..." rather than the abbreviated "insert ...". |
Property: batchDelimiter (Batch Delimiter) | |
---|---|
Description | A delimiter (e.g. ";") that can be used to separate multiple SQL statements within a statement batch. |
Property: blobUpdater (BLOB Updater) | |
---|---|
Description |
The name of a class which can be used for updating
database BLOB (long binary) objects where the BLOB size is
greater than psMaximumBlobLength.
The class must implement interface com.sybase.djc.sql.BlobUpdater.
An example implementation for Oracle is:
package com.sybase.djc.sql; import com.sybase.djc.util.*; import java.io.*; import java.sql.*; public class OracleBlobUpdater implements BlobUpdater { public void update(java.sql.ResultSet rs, byte[] value) throws java.sql.SQLException { if (rs.next()) { try { oracle.sql.BLOB b = (oracle.sql.BLOB)rs.getBlob(1); OutputStream s = b.getBinaryOutputStream(); s.write(value); s.close(); } catch (SQLException ex) { throw ex; } catch (IOException ex) { throw new SQLException(ExceptionUtil.causedBy(ex)); } } else { throw new SQLException("row not found for BLOB update"); } } } |
Property: checkDelete (Check Delete SQL) | |
---|---|
Description | Not used in this release. |
Property: checkUpdate (Check Update SQL) | |
---|---|
Description | Not used in this release. |
Property: clobUpdater (CLOB Updater) | |
---|---|
Description |
The name of a class which can be used for updating
database CLOB (long string) objects where the CLOB size is
greater than psMaximumClobLength.
The class must implement interface com.sybase.djc.sql.ClobUpdater.
An example implementation for Oracle is:
package com.sybase.djc.sql; import com.sybase.djc.util.*; import java.io.*; import java.sql.*; public class OracleClobUpdater implements ClobUpdater { public void update(java.sql.ResultSet rs, String value) throws java.sql.SQLException { if (rs.next()) { try { oracle.sql.CLOB c = (oracle.sql.CLOB)rs.getClob(1); Writer s = c.getCharacterOutputStream(); s.write(value); s.close(); } catch (SQLException ex) { throw ex; } catch (IOException ex) { throw new SQLException(ExceptionUtil.causedBy(ex)); } } else { throw new SQLException("row not found for CLOB update"); } } } |
Property: dataSourceClass (JDBC Data Source Class) | |
---|---|
Description | The class or library name used to support single-phase commit transactions. |
Property: databaseName (Default Database Name) | |
---|---|
Description | Default database name for data sources of this type. |
Property: databaseURL (Default Database URL) | |
---|---|
Description | Default connection URL for data sources of this type. |
Property: disablePrefetch (Disable Prefetch) | |
---|---|
Description |
Disables query batching and transactional fetch prediction.
See prefetch (Transaction Property). |
Default Value | true |
Legal Values | false, true |
Property: disableTriggers (Disable Triggers) | |
---|---|
Description | SQL statement to disable database triggers on a per-connection basis. |
Default Value | set triggers off |
Property: driverClass (JDBC Driver Class) | |
---|---|
Description | The JDBC driver class name. |
Property: driverDebug (Driver Debugging On/Off) | |
---|---|
Description | Not used in this release. |
Default Value | false |
Legal Values | false, true |
Property: driverDebugSettings (Driver Debugging Settings) | |
---|---|
Description | Not used in this release. |
Default Value | STATIC:ALL |
Property: getDateAndTime (SQL for Date and Time) | |
---|---|
Description | SQL statement to retrieve current date and time as a java.sql.Timestamp. |
Default Value | select getdate() |
Property: isDownloadZipped (DownloadFile Zipped) | |
---|---|
Description | Default property to indicate if the downloaded file needs to be unzipped before deployment |
Default Value | false |
Legal Values | false, true |
Property: jdbcDriverDownloadURL (Jdbc Driver Download URL) | |
---|---|
Description | Default location for downloading JDBC Driver files. |
Property: networkProtocol (Default Network Protocol) | |
---|---|
Description | Default network protocol for data sources of this type. |
Property: password (Default Password) | |
---|---|
Description | Default password for data sources of this type. |
Property: pingSQL (Ping Connection SQL Statement:) | |
---|---|
Description | A harmless SQL statement than can be used to check if a JDBC connection is still usable. |
Default Value | select 1 |
Property: portNumber (Default Port Number) | |
---|---|
Description | Default port number for data sources of this type. |
Property: psMaximumBlobLength (Maximum length for BLOB update using PreparedStatement.setBytes) |
||
---|---|---|
Description |
Maximum length for BLOB update using PreparedStatement.setBytes.
Some databases require special handling for BLOB values over
this size.
See also: Default Value | 0 |
Minimum Value | 0 | |
Maximum Value | 2147483647 |
Property: psMaximumClobLength (Maximum length for CLOB update using PreparedStatement.setString) |
||
---|---|---|
Description |
Maximum length for BLOB update using PreparedStatement.setBytes.
Some databases require special handling for BLOB values over
this size.
See also: Default Value | 0 |
Minimum Value | 0 | |
Maximum Value | 2147483647 |
Property: roleName (Default Role Name) | |
---|---|
Description | Default database role name for data sources of this type. |
Property: serializableSelect (Serializable Select (SQL Template)) | |
---|---|
Description |
A template SQL statement for selecting rows and acquiring a lock
that ensures strict "serializability", defined in terms of
ensuring equivalence with serial schedules.
Sybase Example: "${selectList}${intoClause}${fromClause} holdlock${whereClause}". Note: some databases do not provide any syntax to acquire this type of lock (e.g. Oracle). Thus it is not possible to support the Serializable persistent object isolation level with all types of database. |
Property: serverName (Default Server Name) | |
---|---|
Description | Default server name for data sources of this type. |
Property: serviceName (Default Service Name) | |
---|---|
Description | Default database service name for data sources of this type. |
Property: useQuotedIdentifiers (Use Quoted Identifiers) | |
---|---|
Description | If you select this option, SQL identifiers are quoted. |
Default Value | true |
Legal Values | false, true |
Property: user (Default User) | |
---|---|
Description | Default user name for data sources of this type. |
Property: xaDataSourceClass (JDBC/XA Data Source Class) | |
---|---|
Description | The class or library name used to support two-phase commit transactions, and the name of the XA resource library. |