public class DatabasePlatform extends DatasourcePlatform
AccessPlatform
,
DB2Platform
,
DBasePlatform
,
OraclePlatform
,
SybasePlatform
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_BATCH_WRITING_SIZE
Bug#3214927 The default is 32000 for DynamicSQLBatchWritingMechanism.
|
static int |
DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE |
static int |
IS_VALID_TIMEOUT
Timeout used is isValid() check for dead connections.
|
static boolean |
shouldIgnoreCaseOnFieldComparisons
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
static int |
Types_NCLOB |
static int |
Types_SQLXML |
Constructor and Description |
---|
DatabasePlatform() |
Modifier and Type | Method and Description |
---|---|
int |
addBatch(java.sql.PreparedStatement statement)
INTERNAL: This gets called on each iteration to add parameters to the batch
Needs to be implemented so that it returns the number of rows successfully modified
by this statement for optimistic locking purposes (if useNativeBatchWriting is enabled, and
the call uses optimistic locking).
|
void |
addStructConverter(StructConverter converter)
PUBLIC:
Add a StructConverter to this DatabasePlatform
This StructConverter will be invoked for all writes to the database for the class returned
by its getJavaType() method and for all reads from the database for the Structs described
by its getStructName() method
|
boolean |
allowsSizeInProcedureArguments()
Used for stored procedure definitions.
|
void |
appendLiteralToCall(Call call,
java.io.Writer writer,
java.lang.Object literal)
INTERNAL:
In case shouldBindLiterals is true, instead of null value a DatabaseField
value may be passed (so that it's type could be used for binding null).
|
void |
appendParameter(Call call,
java.io.Writer writer,
java.lang.Object parameter)
Write a database-friendly representation of the given parameter to the writer.
|
int |
appendParameterInternal(Call call,
java.io.Writer writer,
java.lang.Object parameter)
Returns the number of parameters that used binding.
|
void |
autoCommit(DatabaseAccessor accessor)
Used by JDBC drivers that do not support autocommit so simulate an autocommit.
|
void |
beginTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly begin a transaction
This method is a no-op for databases which implement autocommit as expected.
|
Expression |
buildBatchCriteria(ExpressionBuilder builder,
Expression field)
INTERNAL:
Return the selection criteria used to IN batch fetching.
|
Expression |
buildBatchCriteriaForComplexId(ExpressionBuilder builder,
java.util.List<Expression> fields)
INTERNAL:
Return the selection criteria used to IN batch fetching.
|
DatabaseCall |
buildCallWithReturning(SQLCall sqlCall,
java.util.Vector returnFields)
INTERNAL
Returns null unless the platform supports call with returning
|
java.lang.String |
buildCreateIndex(java.lang.String fullTableName,
java.lang.String indexName,
java.lang.String... columnNames)
INTERNAL:
Don't override this method.
|
java.lang.String |
buildCreateIndex(java.lang.String fullTableName,
java.lang.String indexName,
java.lang.String qualifier,
boolean isUnique,
java.lang.String... columnNames)
INTERNAL:
Override this method with the platform's CREATE INDEX statement.
|
java.lang.String |
buildDropIndex(java.lang.String fullTableName,
java.lang.String indexName)
INTERNAL:
Don't override this method.
|
java.lang.String |
buildDropIndex(java.lang.String fullTableName,
java.lang.String indexName,
java.lang.String qualifier)
INTERNAL:
Override this method with the platform's DROP INDEX statement.
|
java.lang.String |
buildProcedureCallString(StoredProcedureCall call,
AbstractSession session,
AbstractRecord row)
Return the proc syntax for this platform.
|
java.io.Writer |
buildSequenceObjectAlterIncrementWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment)
INTERNAL:
Returns sql used to alter sequence object's increment in the database.
|
java.io.Writer |
buildSequenceObjectCreationWriter(java.io.Writer writer,
java.lang.String fullSeqName,
int increment,
int start)
INTERNAL:
Returns sql used to create sequence object in the database.
|
java.io.Writer |
buildSequenceObjectDeletionWriter(java.io.Writer writer,
java.lang.String fullSeqName)
INTERNAL:
Returns sql used to delete sequence object from the database.
|
boolean |
canBatchWriteWithOptimisticLocking(DatabaseCall call)
INTERNAL:
Supports Batch Writing with Optimistic Locking.
|
boolean |
canBuildCallWithReturning()
INTERNAL
Indicates whether the platform can build call with returning.
|
void |
commitTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly commit a transaction
This method is a no-op for databases which implement autocommit as expected.
|
int |
computeMaxRowsForSQL(int firstResultIndex,
int maxResults)
INTERNAL:
Use the JDBC maxResults and firstResultIndex setting to compute a value to use when
limiting the results of a query in SQL.
|
java.lang.Object |
convertToDatabaseType(java.lang.Object value)
INTERNAL
We support more primitive than JDBC does so we must do conversion before printing or binding.
|
void |
copyInto(Platform platform)
Copy the state into the new platform.
|
java.sql.Array |
createArray(java.lang.String elementDataTypeName,
java.lang.Object[] elements,
AbstractSession session,
java.sql.Connection connection)
INTERNAL:
This method builds an Array using the unwrapped connection within the session
|
java.sql.Array |
createArray(java.lang.String elementDataTypeName,
java.lang.Object[] elements,
java.sql.Connection connection)
INTERNAL:
Platforms that support java.sql.Array may override this method.
|
java.sql.Struct |
createStruct(java.lang.String structTypeName,
java.lang.Object[] attributes,
AbstractSession session,
java.sql.Connection connection)
INTERNAL:
This method builds a Struct using the unwrapped connection within the session
|
java.sql.Struct |
createStruct(java.lang.String structTypeName,
java.lang.Object[] attributes,
java.sql.Connection connection)
INTERNAL:
Platforms that support java.sql.Struct may override this method.
|
boolean |
dontBindUpdateAllQueryUsingTempTables()
INTERNAL:
May need to override this method if the sql generated for UpdateAllQuery
using temp tables fails in case parameter binding is used.
|
int |
executeBatch(java.sql.Statement statement,
boolean isStatementPrepared)
Internal: This gets called on each batch statement execution
Needs to be implemented so that it returns the number of rows successfully modified
by this statement for optimistic locking purposes.
|
java.lang.Object |
executeStoredProcedure(DatabaseCall dbCall,
java.sql.PreparedStatement statement,
DatabaseAccessor accessor,
AbstractSession session)
because each platform has different requirements for accessing stored procedures and
the way that we can combine resultsets and output params, the stored procedure call
is being executed on the platform.
|
void |
freeTemporaryObject(java.lang.Object value)
INTERNAL:
Used by some platforms during reading of ResultSet to free temporary objects.
|
java.lang.String |
getAssignmentString()
Used for stored function calls.
|
java.lang.String |
getBatchBeginString()
Used for batch writing and sp defs.
|
java.lang.String |
getBatchDelimiterString()
Used for batch writing and sp defs.
|
java.lang.String |
getBatchEndString()
Used for batch writing and sp defs.
|
java.lang.String |
getBatchRowCountAssignString()
Used for batch writing for row count return.
|
java.lang.String |
getBatchRowCountDeclareString()
Used for batch writing for row count return.
|
java.lang.String |
getBatchRowCountReturnString()
Used for batch writing for row count return.
|
BatchWritingMechanism |
getBatchWritingMechanism()
Return the custom batch writing mechanism.
|
int |
getCastSizeForVarcharParameter()
ADVANCED:
Get the maximum length allowed by the database for a Varchar Parameter
This is used by subclasses when writing SQL for parameters
|
java.util.Map<java.lang.String,java.lang.Class> |
getClassTypes()
Return the class type to database type mapping for the schema framework.
|
java.sql.Connection |
getConnection(AbstractSession session,
java.sql.Connection connection)
INTERNAL:
This method is used to unwrap the oracle connection wrapped by
the application server.
|
java.lang.String |
getConnectionUserName()
INTERNAL:
Returns user name retrieved from JDBC connection.
|
java.lang.String |
getConstraintDeletionString()
Used for constraint deletion.
|
java.lang.String |
getCreateDatabaseSchemaString(java.lang.String schema)
Return the create schema SQL syntax.
|
java.lang.String |
getCreateViewString()
/**
Used for view creation.
|
java.lang.String |
getCreationInOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
java.lang.String |
getCreationOutputProcedureToken()
This method is used to print the required output parameter token for the
specific platform.
|
int |
getCursorCode()
ADVANCED:
Return the code for preparing cursored output
parameters in a stored procedure
|
java.lang.Object |
getCustomModifyValueForCall(Call call,
java.lang.Object value,
DatabaseField field,
boolean shouldBind)
This method determines if any special processing needs to occur prior to writing a field.
|
java.lang.String |
getDefaultSequenceTableName()
Returns the table name used by TableSequence by default.
|
boolean |
getDriverSupportsNVarChar() |
java.lang.String |
getDropCascadeString()
Allows DROP TABLE to cascade dropping of any dependent constraints if the database supports this option.
|
java.lang.String |
getDropDatabaseSchemaString(java.lang.String schema)
Return the drop schema SQL syntax.
|
FieldTypeDefinition |
getFieldTypeDefinition(java.lang.Class javaClass)
Return the field type object describing this databases platform specific representation
of the Java primitive class name.
|
java.util.Map<java.lang.Class,FieldTypeDefinition> |
getFieldTypes()
Return the class type to database type mappings for the schema framework.
|
java.lang.String |
getFunctionCallHeader()
Used for stored function calls.
|
java.lang.String |
getIdentifierQuoteCharacter()
Deprecated.
|
java.lang.String |
getIndexNamePrefix(boolean isUniqueSetOnField)
Used to allow platforms to define their own index prefixes
|
java.lang.String |
getInOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
java.lang.String |
getInputProcedureToken()
Used for stored procedure creation: Prefix for INPUT parameters.
|
java.lang.String |
getJDBCOuterJoinString()
Returns the JDBC outer join operator for SELECT statements.
|
int |
getJDBCType(java.lang.Class javaType)
Return the JDBC type for the Java type.
|
int |
getJDBCType(DatabaseField field)
Return the JDBC type for the given database field.
|
int |
getJDBCTypeForSetNull(DatabaseField field)
Return the JDBC type for the given database field to be passed to Statement.setNull
|
java.lang.String |
getJdbcTypeName(int jdbcType)
INTERNAL:
Returns the type name corresponding to the jdbc type
|
int |
getMaxBatchWritingSize()
PUBLIC:
Allow for the max batch writing size to be set.
|
int |
getMaxFieldNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a field
name on this platform.
|
int |
getMaxForeignKeyNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a foreign key
name on this platform.
|
int |
getMaxIndexNameSize()
INTERNAL:
returns the maximum number of characters that can be used in an index
name on this platform.
|
int |
getMaxUniqueKeyNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a unique key
name on this platform.
|
java.lang.String |
getNoWaitString()
This syntax does no wait on the lock.
|
java.lang.Object |
getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
INTERNAL:
Get the object from the JDBC Result set.
|
java.lang.String |
getOutputProcedureToken()
This method is used to print the output parameter token when stored
procedures are called
|
DataPartitioningCallback |
getPartitioningCallback()
Return callback.
|
java.lang.String |
getPingSQL()
Used for determining if an SQL exception was communication based.
|
java.lang.String |
getProcedureArgumentSetter()
Used for sp calls.
|
java.lang.String |
getProcedureArgumentString()
Used for sp defs.
|
java.lang.String |
getProcedureAsString()
Used for stored procedure defs.
|
java.lang.String |
getProcedureBeginString()
Used for stored procedure defs.
|
java.lang.String |
getProcedureCallHeader()
Used for sp calls.
|
java.lang.String |
getProcedureCallTail()
Used for sp calls.
|
java.lang.String |
getProcedureEndString()
Used for stored procedure defs.
|
java.lang.String |
getQualifiedName(java.lang.String name) |
java.lang.String |
getQualifiedSequenceTableName() |
java.lang.Object |
getRefValue(java.sql.Ref ref,
AbstractSession executionSession,
java.sql.Connection connection)
INTERNAL:
This method builds a REF using the unwrapped connection within the session
|
java.lang.Object |
getRefValue(java.sql.Ref ref,
java.sql.Connection connection)
INTERNAL:
Platforms that support java.sql.Ref may override this method.
|
java.lang.String |
getSelectForUpdateNoWaitString()
This syntax does no wait on the lock.
|
java.lang.String |
getSelectForUpdateOfString()
For fine-grained pessimistic locking the column names can be
specified individually.
|
java.lang.String |
getSelectForUpdateString()
Most database support a syntax.
|
java.lang.String |
getSelectForUpdateWaitString(java.lang.Integer waitTimeout)
Platforms that support the WAIT option should override this method.
|
java.lang.String |
getSequenceCounterFieldName() |
java.lang.String |
getSequenceNameFieldName() |
int |
getSequencePreallocationSize() |
java.lang.String |
getSequenceTableName() |
int |
getStatementCacheSize()
The statement cache size for prepare parameterized statements.
|
java.lang.String |
getStoredProcedureParameterPrefix() |
java.lang.String |
getStoredProcedureTerminationToken()
Returns the delimiter between stored procedures in multiple stored
procedure calls.
|
int |
getStringBindingSize() |
java.util.Map<java.lang.String,StructConverter> |
getStructConverters()
INTERNAL:
Get the map of StructConverters that will be used to preprocess
STRUCT data as it is read
|
java.lang.String |
getTableCreationSuffix()
PUBLIC:
Get the String used on all table creation statements generated from the DefaultTableGenerator
with a session using this project (DDL generation).
|
DatabaseTable |
getTempTableForTable(DatabaseTable table)
INTERNAL:
May override this method if the platform support temporary tables.
|
int |
getTransactionIsolation()
Returns the transaction isolation setting for a connection.
|
java.util.Map<java.lang.Class,StructConverter> |
getTypeConverters()
INTERNAL:
Get the map of TypeConverters
This map indexes StructConverters by the Java Class they are meant to
convert
|
java.lang.String |
getUniqueConstraintDeletionString()
Used for constraint deletion.
|
boolean |
getUseNationalCharacterVaryingTypeForString() |
DatabaseQuery |
getVPDClearIdentifierQuery(java.lang.String vpdIdentifier)
Any platform that supports VPD should implement this method.
|
java.lang.String |
getVPDCreationFunctionString(java.lang.String tableName,
java.lang.String tenantFieldName)
Any platform that supports VPD should implement this method.
|
java.lang.String |
getVPDCreationPolicyString(java.lang.String tableName,
AbstractSession session)
Any platform that supports VPD should implement this method.
|
java.lang.String |
getVPDDeletionString(java.lang.String tableName,
AbstractSession session)
Any platform that supports VPD should implement this method.
|
DatabaseQuery |
getVPDSetIdentifierQuery(java.lang.String vpdIdentifier)
Any platform that supports VPD should implement this method.
|
boolean |
hasPartitioningCallback()
Check if has callback.
|
void |
initialize()
Initialize operators to avoid concurrency issues.
|
void |
initializeConnectionData(java.sql.Connection connection)
INTERNAL:
Allow initialization from the connection.
|
boolean |
isAlterSequenceObjectSupported()
INTERNAL:
Override this method if the platform supports sequence objects
and it's possible to alter sequence object's increment in the database.
|
boolean |
isCastRequired()
Return if casting is enabled for platforms that support it.
|
boolean |
isDynamicSQLRequiredForFunctions()
INTERNAL:
Some databases have issues with using parameters on certain functions and relations.
|
boolean |
isForUpdateCompatibleWithDistinct()
INTERNAL:
Indicates whether SELECT DISTINCT ...
|
boolean |
isInformixOuterJoin()
Some database require outer joins to be given in the where clause, others require it in the from clause.
|
boolean |
isJDBCExecuteCompliant()
Returns true if this platform complies with the expected behavior from
a jdbc execute call.
|
boolean |
isLobCompatibleWithDistinct()
INTERNAL:
Indicates whether SELECT DISTINCT lob FROM ...
|
boolean |
isLockTimeoutException(DatabaseException e)
Return true is the given exception occurred as a result of a lock
time out exception (WAIT clause).
|
boolean |
isNullAllowedInSelectClause()
INTERNAL:
Override this if the platform cannot handle NULL in select clause.
|
boolean |
isOutputAllowWithResultSet()
INTERNAL:
Return true if output parameters can be built with result sets.
|
boolean |
isRowCountOutputParameterRequired()
Return if the platform does not maintain the row count on batch executes
and requires an output parameter to maintain the row count.
|
boolean |
isXDBDocument(java.lang.Object obj)
INTERNAL:
Indicates whether the passed object is an instance of XDBDocument.
|
java.util.Hashtable |
maximumNumericValues()
Builds a table of maximum numeric values keyed on java class.
|
java.util.Hashtable |
minimumNumericValues()
Builds a table of minimum numeric values keyed on java class.
|
long |
minimumTimeIncrement()
INTERNAL:
Returns the minimum time increment supported by the platform.
|
java.sql.Statement |
prepareBatchStatement(java.sql.Statement statement,
int maxBatchWritingSize)
Internal: Allows setting the batch size on the statement
Is used with parameterized SQL, and should only be passed in prepared statements
|
void |
printFieldIdentityClause(java.io.Writer writer)
Append the receiver's field 'identity' constraint clause to a writer.
|
void |
printFieldNotNullClause(java.io.Writer writer)
Append the receiver's field 'NOT NULL' constraint clause to a writer.
|
void |
printFieldNullClause(java.io.Writer writer)
Append the receiver's field 'NULL' constraint clause to a writer.
|
void |
printFieldTypeSize(java.io.Writer writer,
FieldDefinition field,
FieldTypeDefinition fieldType,
boolean shouldPrintFieldIdentityClause) |
void |
printFieldUnique(java.io.Writer writer,
boolean shouldPrintFieldIdentityClause) |
void |
printSQLSelectStatement(DatabaseCall call,
ExpressionSQLPrinter printer,
SQLSelectStatement statement)
INTERNAL:
Print the SQL representation of the statement on a stream, storing the fields
in the DatabaseCall.
|
void |
printStoredFunctionReturnKeyWord(java.io.Writer writer)
INTERNAL:
Prints return keyword for StoredFunctionDefinition:
CREATE FUNCTION StoredFunction_In (P_IN BIGINT)
RETURN BIGINT
The method was introduced because MySQL requires "RETURNS" instead:
CREATE FUNCTION StoredFunction_In (P_IN BIGINT)
RETURNS BIGINT
|
int |
printValuelist(java.util.Collection theObjects,
DatabaseCall call,
java.io.Writer writer) |
int |
printValuelist(int[] theObjects,
DatabaseCall call,
java.io.Writer writer)
Print the int array on the writer.
|
void |
registerOutputParameter(java.sql.CallableStatement statement,
int index,
int jdbcType)
This method is used to register output parameter on Callable Statements for Stored Procedures
as each database seems to have a different method.
|
boolean |
requiresNamedPrimaryKeyConstraints()
This is used as some databases create the primary key constraint differently, i.e.
|
boolean |
requiresProcedureBrackets()
Used for stored procedure creation: Some platforms need brackets around arguments declaration even if no arguments exist.
|
boolean |
requiresProcedureCallBrackets()
USed for sp calls.
|
boolean |
requiresProcedureCallOuputToken()
Used for sp calls.
|
boolean |
requiresTableInIndexDropDDL()
INTERNAL:
Return if this database requires the table name when dropping an index.
|
boolean |
requiresTypeNameToRegisterOutputParameter()
INTERNAL:
Indicates whether the version of CallableStatement.registerOutputParameter method
that takes type name should be used.
|
boolean |
requiresUniqueConstraintCreationOnTableCreate()
Used for table creation.
|
void |
retrieveFirstPrimaryKeyOrOne(ReportQuery subselect)
INTERNAL:
Used by Exists queries because they just need to select a single row.
|
void |
rollbackTransaction(DatabaseAccessor accessor)
Used for jdbc drivers which do not support autocommit to explicitly rollback a transaction
This method is a no-op for databases which implement autocommit as expected.
|
void |
setBatchWritingMechanism(BatchWritingMechanism batchWritingMechanism)
Set the custom batch writing mechanism.
|
void |
setCastSizeForVarcharParameter(int maxLength)
ADVANCED:
Set the maximum length allowed by the database for a Varchar Parameter
This is used by subclasses when writing SQL for parameters
|
void |
setCursorCode(int cursorCode)
ADVANCED:
Set the code for preparing cursored output
parameters in a stored procedure
|
void |
setDriverName(java.lang.String driverName)
During auto-detect, the driver name is set on the platform.
|
void |
setDriverSupportsNVarChar(boolean b) |
void |
setIsCastRequired(boolean isCastRequired)
Set if casting is enabled for platforms that support it.
|
void |
setMaxBatchWritingSize(int maxBatchWritingSize)
PUBLIC:
Allow for the max batch writing size to be set.
|
void |
setParameterValueInDatabaseCall(java.lang.Object parameter,
java.sql.PreparedStatement statement,
int index,
AbstractSession session)
INTERNAL
Set the parameter in the JDBC statement.
|
void |
setPartitioningCallback(DataPartitioningCallback partitioningCallback)
Set callback.
|
void |
setPingSQL(java.lang.String pingSQL)
Used for determining if an SQL exception was communication based.
|
void |
setPrintInnerJoinInWhereClause(boolean printInnerJoinInWhereClause)
PUBLIC:
Changes the way that inner joins are printed in generated SQL for the database.
|
void |
setPrintOuterJoinInWhereClause(boolean printOuterJoinInWhereClause)
PUBLIC:
Changes the way that OuterJoins are done on the database.
|
void |
setSequenceCounterFieldName(java.lang.String name) |
void |
setSequenceNameFieldName(java.lang.String name) |
void |
setSequenceTableName(java.lang.String name) |
void |
setShouldBindAllParameters(boolean shouldBindAllParameters)
Bind all arguments to any SQL statement.
|
void |
setShouldBindLiterals(boolean shouldBindLiterals)
PUBLIC:
Allows user to choose whether to bind literals in DatabaseCalls or not.
|
void |
setShouldCacheAllStatements(boolean shouldCacheAllStatements)
Cache all prepared statements, this requires full parameter binding as well.
|
void |
setShouldCreateIndicesOnForeignKeys(boolean shouldCreateIndicesOnForeignKeys)
Used for table creation.
|
void |
setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
Can be used if the app expects upper case but the database is not return consistent case, i.e.
|
static void |
setShouldIgnoreCaseOnFieldComparisons(boolean newShouldIgnoreCaseOnFieldComparisons)
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
void |
setShouldOptimizeDataConversion(boolean value)
PUBLIC:
Set if our driver level data conversion optimization is enabled.
|
void |
setShouldTrimStrings(boolean aBoolean) |
void |
setShouldUseRownumFiltering(boolean useRownumFiltering)
PUBLIC:
Set if SQL-Level pagination should be used for FirstResult and MaxRows settings.
|
void |
setStatementCacheSize(int statementCacheSize)
The statement cache size for prepare parameterized statements.
|
void |
setStoredProcedureTerminationToken(java.lang.String storedProcedureTerminationToken) |
void |
setStringBindingSize(int aSize) |
void |
setSupportsAutoCommit(boolean supportsAutoCommit)
supportsAutoCommit can be set to false for JDBC drivers which do not support autocommit.
|
void |
setTableCreationSuffix(java.lang.String tableCreationSuffix)
PUBLIC:
Get the String used on all table creation statements generated from the DefaultTableGenerator
with a session using this project (DDL generation).
|
void |
setTransactionIsolation(int isolationLevel)
Set the transaction isolation setting for a connection.
|
void |
setUseJDBCStoredProcedureSyntax(java.lang.Boolean useJDBCStoredProcedureSyntax)
Return true if JDBC syntax should be used for stored procedure calls.
|
void |
setUseNationalCharacterVaryingTypeForString(boolean b) |
void |
setUsesBatchWriting(boolean usesBatchWriting) |
void |
setUsesByteArrayBinding(boolean usesByteArrayBinding) |
void |
setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)
Some JDBC 2 drivers to not support batching, so this lets are own batching be used.
|
void |
setUsesNativeBatchWriting(boolean usesNativeBatchWriting)
Advanced:
This is used to enable native batch writing on drivers that support it.
|
void |
setUsesNativeSQL(boolean usesNativeSQL) |
void |
setUsesStreamsForBinding(boolean usesStreamsForBinding) |
void |
setUsesStringBinding(boolean aBool) |
boolean |
shouldAlwaysUseTempStorageForModifyAll()
INTERNAL:
That method affects UpdateAllQuery and DeleteAllQuery execution.
|
boolean |
shouldBindAllParameters()
Bind all arguments to any SQL statement.
|
boolean |
shouldBindLiterals()
PUBLIC:
Allows platform to choose whether to bind literals in DatabaseCalls or not.
|
boolean |
shouldCacheAllStatements()
Cache all prepared statements, this requires full parameter binding as well.
|
boolean |
shouldCreateIndicesForPrimaryKeys()
Used for table creation.
|
boolean |
shouldCreateIndicesOnForeignKeys()
Used for table creation.
|
boolean |
shouldCreateIndicesOnUniqueKeys()
Used for table creation.
|
boolean |
shouldForceFieldNamesToUpperCase()
Can be used if the app expects upper case but the database is not return consistent case, i.e.
|
static boolean |
shouldIgnoreCaseOnFieldComparisons()
Allow for case in field names to be ignored as some databases are not case sensitive and when using custom this can be an issue.
|
boolean |
shouldIgnoreException(java.sql.SQLException exception)
Allow for the platform to ignore exceptions.
|
boolean |
shouldOptimizeDataConversion()
Return if our driver level data conversion optimization is enabled.
|
boolean |
shouldPrintAliasForUpdate()
INTERNAL:
Indicates whether locking OF clause should print alias for field.
|
boolean |
shouldPrintConstraintNameAfter()
Some Platforms want the constraint name after the constraint definition.
|
boolean |
shouldPrintFieldIdentityClause(AbstractSession session,
java.lang.String qualifiedFieldName) |
boolean |
shouldPrintForUpdateClause() |
boolean |
shouldPrintInnerJoinInWhereClause()
This allows which clause inner joins are printed into in SQL generation.
|
boolean |
shouldPrintInOutputTokenBeforeType()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintInputTokenAtStart()
Used for stored procedure creation: Some platforms want to print prefix for INPUT arguments BEFORE NAME.
|
boolean |
shouldPrintLockingClauseAfterWhereClause()
INTERNAL:
Indicates whether locking clause should be printed after where clause by SQLSelectStatement.
|
boolean |
shouldPrintOuterJoinInWhereClause()
Some database require outer joins to be given in the where clause, others require it in the from clause.
|
boolean |
shouldPrintOutputTokenAtStart()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintOutputTokenBeforeType()
This is required in the construction of the stored procedures with
output parameters
|
boolean |
shouldPrintStoredProcedureArgumentNameInCall()
INTERNAL:
Should the variable name of a stored procedure call be printed as part of the procedure call
e.g.
|
boolean |
shouldPrintStoredProcedureVariablesAfterBeginString()
Used for stored procedure creation: Some platforms declare variables AFTER the procedure body's BEGIN string.
|
boolean |
shouldTrimStrings() |
boolean |
shouldUseCustomModifyForCall(DatabaseField field)
Used by SQLCall.appendModify(..)
If the field should be passed to customModifyInDatabaseCall, retun true,
otherwise false.
|
boolean |
shouldUseGetSetNString()
Returns true iff:
tThe current driver supports calling get/setNString
Strings are globally mapped to a national character varying type (useNationalCharacterVarying()).
|
boolean |
shouldUseJDBCOuterJoinSyntax()
JDBC defines and outer join syntax, many drivers do not support this.
|
boolean |
shouldUseRownumFiltering()
PUBLIC:
Return if Oracle ROWNUM pagination should be used for FirstResult and MaxRows settings.
|
boolean |
supportsANSIInnerJoinSyntax()
Indicates whether the ANSI syntax for inner joins (e.g.
|
boolean |
supportsAutoCommit()
supportsAutoCommit must sometimes be set to false for JDBC drivers which do not
support autocommit.
|
boolean |
supportsAutoConversionToNumericForArithmeticOperations()
Some db allow VARCHAR db field to be used in arithmetic operations automatically converting them to numeric:
UPDATE OL_PHONE SET PHONE_ORDER_VARCHAR = (PHONE_ORDER_VARCHAR + 1) WHERE ...
|
boolean |
supportsConnectionUserName()
INTERNAL:
Override this method if the platform supports storing JDBC connection user name during
initializeConnectionData(Connection) . |
boolean |
supportsCountDistinctWithMultipleFields()
INTERNAL:
Indicates whether the platform supports the count distinct function with multiple fields.
|
boolean |
supportsDeleteOnCascade() |
boolean |
supportsForeignKeyConstraints() |
boolean |
supportsGlobalTempTables()
INTERNAL:
Indicates whether the platform supports global temporary tables.
|
boolean |
supportsIndexes()
INTERNAL:
Return if this database support index creation.
|
boolean |
supportsIndividualTableLocking()
INTERNAL:
Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery.
|
boolean |
supportsLocalTempTables()
INTERNAL:
Indicates whether the platform supports local temporary tables.
|
boolean |
supportsLockingQueriesWithMultipleTables()
INTERNAL:
Indicates whether locking clause could be applied to the query that has more than one table
|
boolean |
supportsNestingOuterJoins()
INTERNAL:
Return if nesting outer joins is supported, i.e.
|
boolean |
supportsOuterJoinsWithBrackets()
INTERNAL:
Return if brackets can be used in the ON clause for outer joins.
|
boolean |
supportsPrimaryKeyConstraint() |
boolean |
supportsStoredFunctions() |
boolean |
supportsTempTables()
INTERNAL:
Indicates whether the platform supports temporary tables.
|
boolean |
supportsUniqueColumns()
Allows unique columns to be defined as constraint if the UNIQUE keyword is not support on a column defintion.
|
boolean |
supportsUniqueKeyConstraints() |
boolean |
supportsVPD()
By default, platforms do not support VPD.
|
boolean |
usesBatchWriting() |
boolean |
usesByteArrayBinding() |
boolean |
usesJDBCBatchWriting()
Some JDBC 2 drivers to not support batching, so this lets are own batching be used.
|
boolean |
usesNativeBatchWriting() |
boolean |
usesNativeSQL() |
boolean |
usesSequenceTable() |
boolean |
usesStreamsForBinding() |
boolean |
usesStringBinding() |
boolean |
wasFailureCommunicationBased(java.sql.SQLException exception,
java.sql.Connection connection,
AbstractSession sessionForProfile) |
void |
writeAddColumnClause(java.io.Writer writer,
AbstractSession session,
TableDefinition table,
FieldDefinition field)
INTERNAL:
May need to override this method if the platform supports ALTER TABLE ADD <column>
and the generated sql doesn't work.
|
void |
writeCleanUpTempTableSql(java.io.Writer writer,
DatabaseTable table)
INTERNAL:
Don't override this method.
|
void |
writeCreateTempTableSql(java.io.Writer writer,
DatabaseTable table,
AbstractSession session,
java.util.Collection pkFields,
java.util.Collection usedFields,
java.util.Collection allFields)
INTERNAL:
Don't override this method.
|
void |
writeDeleteFromTargetTableUsingTempTableSql(java.io.Writer writer,
DatabaseTable table,
DatabaseTable targetTable,
java.util.Collection pkFields,
java.util.Collection targetPkFields,
DatasourcePlatform platform)
INTERNAL:
Write an sql string for deletion from target table using temporary table.
|
void |
writeInsertIntoTableSql(java.io.Writer writer,
DatabaseTable table,
java.util.Collection usedFields)
INTERNAL:
May need to override this method if the platform supports temporary tables
and the generated sql doesn't work.
|
void |
writeLOB(DatabaseField field,
java.lang.Object value,
java.sql.ResultSet resultSet,
AbstractSession session)
INTERNAL:
Write LOB value - only on Oracle8 and up
|
void |
writeParameterMarker(java.io.Writer writer,
ParameterExpression expression,
AbstractRecord record,
DatabaseCall call) |
void |
writeTableCreationSuffix(java.io.Writer writer,
java.lang.String tableCreationSuffix)
INTERNAL:
Write used on all table creation statements generated from the DefaultTableGenerator
with a session using this project (DDL generation).
|
void |
writeUpdateOriginalFromTempTableSql(java.io.Writer writer,
DatabaseTable table,
java.util.Collection pkFields,
java.util.Collection assignedFields)
INTERNAL:
May need to override this method if the platform supports temporary tables
and the generated sql doesn't work.
|
addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getTimestampQuery, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsIdentity, supportsNativeSequenceNumbers, supportsSequenceObjects, toString, usesPlatformDefaultSequence
public static boolean shouldIgnoreCaseOnFieldComparisons
public static int DEFAULT_MAX_BATCH_WRITING_SIZE
public static int DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE
public static int IS_VALID_TIMEOUT
public static final int Types_NCLOB
public static final int Types_SQLXML
public void initialize()
initialize
in interface Platform
initialize
in class DatasourcePlatform
public boolean hasPartitioningCallback()
public DataPartitioningCallback getPartitioningCallback()
public void setPartitioningCallback(DataPartitioningCallback partitioningCallback)
public boolean isCastRequired()
public void setIsCastRequired(boolean isCastRequired)
public java.util.Map<java.lang.String,StructConverter> getStructConverters()
public java.lang.String getTableCreationSuffix()
public java.util.Map<java.lang.Class,StructConverter> getTypeConverters()
public void addStructConverter(StructConverter converter)
converter
- public int addBatch(java.sql.PreparedStatement statement) throws java.sql.SQLException
java.sql.SQLException
public boolean allowsSizeInProcedureArguments()
public void appendLiteralToCall(Call call, java.io.Writer writer, java.lang.Object literal)
public void appendParameter(Call call, java.io.Writer writer, java.lang.Object parameter)
appendParameter
in interface Platform
appendParameter
in class DatasourcePlatform
public int appendParameterInternal(Call call, java.io.Writer writer, java.lang.Object parameter)
public void autoCommit(DatabaseAccessor accessor) throws java.sql.SQLException
java.sql.SQLException
public void beginTransaction(DatabaseAccessor accessor) throws java.sql.SQLException
java.sql.SQLException
public Expression buildBatchCriteria(ExpressionBuilder builder, Expression field)
public Expression buildBatchCriteriaForComplexId(ExpressionBuilder builder, java.util.List<Expression> fields)
public DatabaseCall buildCallWithReturning(SQLCall sqlCall, java.util.Vector returnFields)
public boolean shouldUseGetSetNString()
public boolean getDriverSupportsNVarChar()
public void setDriverSupportsNVarChar(boolean b)
public boolean getUseNationalCharacterVaryingTypeForString()
public void setUseNationalCharacterVaryingTypeForString(boolean b)
public java.lang.String buildProcedureCallString(StoredProcedureCall call, AbstractSession session, AbstractRecord row)
public boolean canBuildCallWithReturning()
public boolean canBatchWriteWithOptimisticLocking(DatabaseCall call)
public int computeMaxRowsForSQL(int firstResultIndex, int maxResults)
readQuery
- firstResultIndex
- maxResults
- MySQLPlatform
public void commitTransaction(DatabaseAccessor accessor) throws java.sql.SQLException
java.sql.SQLException
public DatabaseQuery getVPDClearIdentifierQuery(java.lang.String vpdIdentifier)
public java.lang.String getVPDCreationFunctionString(java.lang.String tableName, java.lang.String tenantFieldName)
public java.lang.String getVPDCreationPolicyString(java.lang.String tableName, AbstractSession session)
public java.lang.String getVPDDeletionString(java.lang.String tableName, AbstractSession session)
public DatabaseQuery getVPDSetIdentifierQuery(java.lang.String vpdIdentifier)
public java.lang.Object convertToDatabaseType(java.lang.Object value)
public void copyInto(Platform platform)
copyInto
in interface Platform
copyInto
in class DatasourcePlatform
public java.lang.String getBatchBeginString()
public boolean isRowCountOutputParameterRequired()
public java.lang.String getBatchRowCountDeclareString()
public java.lang.String getBatchRowCountAssignString()
public java.lang.String getBatchRowCountReturnString()
public java.lang.String getBatchDelimiterString()
public java.lang.String getBatchEndString()
public java.sql.Connection getConnection(AbstractSession session, java.sql.Connection connection)
public java.lang.String getConstraintDeletionString()
public java.lang.String getUniqueConstraintDeletionString()
public java.lang.String getCreateViewString()
public java.lang.String getDropCascadeString()
public java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)
getCustomModifyValueForCall
in interface Platform
getCustomModifyValueForCall
in class DatasourcePlatform
public java.lang.String getProcedureEndString()
public java.lang.String getProcedureBeginString()
public java.lang.String getProcedureAsString()
public java.util.Map<java.lang.String,java.lang.Class> getClassTypes()
public java.lang.String getAssignmentString()
public int getCastSizeForVarcharParameter()
DB2Platform
public java.lang.String getCreationInOutputProcedureToken()
public java.lang.String getCreationOutputProcedureToken()
public int getCursorCode()
public java.lang.String getDefaultSequenceTableName()
public java.lang.String getCreateDatabaseSchemaString(java.lang.String schema)
public java.lang.String getDropDatabaseSchemaString(java.lang.String schema)
public FieldTypeDefinition getFieldTypeDefinition(java.lang.Class javaClass)
public java.util.Map<java.lang.Class,FieldTypeDefinition> getFieldTypes()
public java.lang.String getFunctionCallHeader()
public java.lang.String getIdentifierQuoteCharacter()
getIdentifierQuoteCharacter
in class DatasourcePlatform
DatasourcePlatform.getStartDelimiter()
,
DatasourcePlatform.getEndDelimiter()
public java.lang.String getInOutputProcedureToken()
public java.lang.String getJDBCOuterJoinString()
public int getJDBCTypeForSetNull(DatabaseField field)
public int getJDBCType(DatabaseField field)
public int getJDBCType(java.lang.Class javaType)
public java.lang.String getJdbcTypeName(int jdbcType)
public long minimumTimeIncrement()
public int getMaxBatchWritingSize()
public int getMaxFieldNameSize()
public int getMaxForeignKeyNameSize()
public int getMaxIndexNameSize()
public int getMaxUniqueKeyNameSize()
public java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int type, AbstractSession session) throws java.sql.SQLException
java.sql.SQLException
org.eclipse.persistence.oraclespecific.Oracle9Platform
public java.lang.String getInputProcedureToken()
public java.lang.String getIndexNamePrefix(boolean isUniqueSetOnField)
isUniqueField
- public java.lang.String getOutputProcedureToken()
public java.lang.String getPingSQL()
public java.lang.String getProcedureArgumentSetter()
public java.lang.String getProcedureArgumentString()
public java.lang.String getProcedureCallHeader()
public java.lang.String getProcedureCallTail()
public java.lang.String getQualifiedSequenceTableName()
public java.lang.String getQualifiedName(java.lang.String name)
public java.lang.String getNoWaitString()
public java.lang.String getSelectForUpdateNoWaitString()
public java.lang.String getSelectForUpdateOfString()
public java.lang.String getSelectForUpdateString()
public java.lang.String getSelectForUpdateWaitString(java.lang.Integer waitTimeout)
public java.lang.String getSequenceCounterFieldName()
public java.lang.String getSequenceNameFieldName()
public int getSequencePreallocationSize()
getSequencePreallocationSize
in class DatasourcePlatform
public java.lang.String getSequenceTableName()
public int getStatementCacheSize()
public java.lang.String getStoredProcedureParameterPrefix()
public java.lang.String getStoredProcedureTerminationToken()
public void setStoredProcedureTerminationToken(java.lang.String storedProcedureTerminationToken)
public int getStringBindingSize()
public int getTransactionIsolation()
public boolean isInformixOuterJoin()
public boolean isJDBCExecuteCompliant()
PostgreSQLPlatform
public boolean isLockTimeoutException(DatabaseException e)
OraclePlatform.
public boolean isForUpdateCompatibleWithDistinct()
public boolean isLobCompatibleWithDistinct()
public java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
public java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
public java.sql.Statement prepareBatchStatement(java.sql.Statement statement, int maxBatchWritingSize) throws java.sql.SQLException
java.sql.SQLException
public void printFieldIdentityClause(java.io.Writer writer) throws ValidationException
ValidationException
public void printFieldNotNullClause(java.io.Writer writer) throws ValidationException
ValidationException
public void printFieldNullClause(java.io.Writer writer) throws ValidationException
ValidationException
public int printValuelist(int[] theObjects, DatabaseCall call, java.io.Writer writer) throws java.io.IOException
java.io.IOException
public int printValuelist(java.util.Collection theObjects, DatabaseCall call, java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void registerOutputParameter(java.sql.CallableStatement statement, int index, int jdbcType) throws java.sql.SQLException
java.sql.SQLException
public boolean requiresNamedPrimaryKeyConstraints()
public boolean requiresProcedureBrackets()
public boolean requiresProcedureCallBrackets()
public boolean requiresProcedureCallOuputToken()
public boolean requiresTypeNameToRegisterOutputParameter()
public boolean requiresUniqueConstraintCreationOnTableCreate()
public void retrieveFirstPrimaryKeyOrOne(ReportQuery subselect)
subselect
- SymfowarePlatform
public void rollbackTransaction(DatabaseAccessor accessor) throws java.sql.SQLException
java.sql.SQLException
public void setCastSizeForVarcharParameter(int maxLength)
DB2Platform
public void setCursorCode(int cursorCode)
public void setDriverName(java.lang.String driverName)
public void setMaxBatchWritingSize(int maxBatchWritingSize)
public void setSequenceCounterFieldName(java.lang.String name)
public void setSequenceNameFieldName(java.lang.String name)
public void setSequenceTableName(java.lang.String name)
public void setShouldBindAllParameters(boolean shouldBindAllParameters)
public void setShouldCacheAllStatements(boolean shouldCacheAllStatements)
public void setShouldForceFieldNamesToUpperCase(boolean shouldForceFieldNamesToUpperCase)
public static void setShouldIgnoreCaseOnFieldComparisons(boolean newShouldIgnoreCaseOnFieldComparisons)
public void setShouldOptimizeDataConversion(boolean value)
public void setShouldTrimStrings(boolean aBoolean)
public void setStatementCacheSize(int statementCacheSize)
public void setStringBindingSize(int aSize)
public void setSupportsAutoCommit(boolean supportsAutoCommit)
public void setTableCreationSuffix(java.lang.String tableCreationSuffix)
public void setTransactionIsolation(int isolationLevel)
public void setUseJDBCStoredProcedureSyntax(java.lang.Boolean useJDBCStoredProcedureSyntax)
public void setUsesBatchWriting(boolean usesBatchWriting)
public void setUsesByteArrayBinding(boolean usesByteArrayBinding)
public void setUsesJDBCBatchWriting(boolean usesJDBCBatchWriting)
public void setUsesNativeBatchWriting(boolean usesNativeBatchWriting)
usesNativeBatchWriting
- - flag to turn on/off native batch writingpublic void setUsesNativeSQL(boolean usesNativeSQL)
public BatchWritingMechanism getBatchWritingMechanism()
public void setBatchWritingMechanism(BatchWritingMechanism batchWritingMechanism)
public void setShouldUseRownumFiltering(boolean useRownumFiltering)
public void setUsesStreamsForBinding(boolean usesStreamsForBinding)
public void setPrintOuterJoinInWhereClause(boolean printOuterJoinInWhereClause)
public void setPrintInnerJoinInWhereClause(boolean printInnerJoinInWhereClause)
public void setUsesStringBinding(boolean aBool)
public boolean shouldBindAllParameters()
public boolean shouldCacheAllStatements()
public boolean shouldCreateIndicesForPrimaryKeys()
public boolean shouldCreateIndicesOnUniqueKeys()
public boolean shouldCreateIndicesOnForeignKeys()
public void setShouldCreateIndicesOnForeignKeys(boolean shouldCreateIndicesOnForeignKeys)
public boolean shouldForceFieldNamesToUpperCase()
public static boolean shouldIgnoreCaseOnFieldComparisons()
public boolean shouldIgnoreException(java.sql.SQLException exception)
public boolean shouldOptimizeDataConversion()
public boolean shouldPrintStoredProcedureVariablesAfterBeginString()
public boolean shouldPrintConstraintNameAfter()
public boolean shouldPrintInOutputTokenBeforeType()
public boolean shouldPrintOuterJoinInWhereClause()
public boolean shouldPrintInnerJoinInWhereClause()
public boolean shouldPrintInputTokenAtStart()
public boolean shouldPrintOutputTokenBeforeType()
public boolean shouldPrintOutputTokenAtStart()
public boolean shouldPrintStoredProcedureArgumentNameInCall()
public boolean shouldPrintForUpdateClause()
public boolean shouldTrimStrings()
public boolean shouldUseCustomModifyForCall(DatabaseField field)
DatasourcePlatform
shouldUseCustomModifyForCall
in interface Platform
shouldUseCustomModifyForCall
in class DatasourcePlatform
public boolean shouldUseJDBCOuterJoinSyntax()
public boolean shouldUseRownumFiltering()
public boolean supportsANSIInnerJoinSyntax()
public boolean supportsAutoCommit()
public boolean supportsAutoConversionToNumericForArithmeticOperations()
public boolean supportsForeignKeyConstraints()
public boolean supportsUniqueKeyConstraints()
public boolean supportsVPD()
public boolean supportsPrimaryKeyConstraint()
public boolean supportsStoredFunctions()
public boolean supportsDeleteOnCascade()
public int executeBatch(java.sql.Statement statement, boolean isStatementPrepared) throws java.sql.SQLException
isStatementPrepared
- - flag is set to true if this statement is preparedjava.sql.SQLException
public java.lang.Object executeStoredProcedure(DatabaseCall dbCall, java.sql.PreparedStatement statement, DatabaseAccessor accessor, AbstractSession session) throws java.sql.SQLException
java.sql.SQLException
public void setPingSQL(java.lang.String pingSQL)
public void setParameterValueInDatabaseCall(java.lang.Object parameter, java.sql.PreparedStatement statement, int index, AbstractSession session) throws java.sql.SQLException
java.sql.SQLException
public boolean usesBatchWriting()
public boolean usesByteArrayBinding()
public boolean usesSequenceTable()
public boolean usesJDBCBatchWriting()
public boolean usesNativeBatchWriting()
public boolean usesNativeSQL()
public boolean usesStreamsForBinding()
public boolean usesStringBinding()
public void writeLOB(DatabaseField field, java.lang.Object value, java.sql.ResultSet resultSet, AbstractSession session) throws java.sql.SQLException
java.sql.SQLException
public boolean supportsCountDistinctWithMultipleFields()
public boolean supportsIndexes()
public boolean requiresTableInIndexDropDDL()
public boolean supportsTempTables()
public boolean supportsLocalTempTables()
public boolean supportsGlobalTempTables()
public DatabaseTable getTempTableForTable(DatabaseTable table)
public void writeCreateTempTableSql(java.io.Writer writer, DatabaseTable table, AbstractSession session, java.util.Collection pkFields, java.util.Collection usedFields, java.util.Collection allFields) throws java.io.IOException
java.io.IOException
public void writeInsertIntoTableSql(java.io.Writer writer, DatabaseTable table, java.util.Collection usedFields) throws java.io.IOException
java.io.IOException
public boolean isNullAllowedInSelectClause()
public boolean isOutputAllowWithResultSet()
public void writeTableCreationSuffix(java.io.Writer writer, java.lang.String tableCreationSuffix) throws java.io.IOException
java.io.IOException
public void writeUpdateOriginalFromTempTableSql(java.io.Writer writer, DatabaseTable table, java.util.Collection pkFields, java.util.Collection assignedFields) throws java.io.IOException
java.io.IOException
public void writeDeleteFromTargetTableUsingTempTableSql(java.io.Writer writer, DatabaseTable table, DatabaseTable targetTable, java.util.Collection pkFields, java.util.Collection targetPkFields, DatasourcePlatform platform) throws java.io.IOException
java.io.IOException
public boolean wasFailureCommunicationBased(java.sql.SQLException exception, java.sql.Connection connection, AbstractSession sessionForProfile)
public void writeCleanUpTempTableSql(java.io.Writer writer, DatabaseTable table) throws java.io.IOException
java.io.IOException
public boolean shouldAlwaysUseTempStorageForModifyAll()
public boolean dontBindUpdateAllQueryUsingTempTables()
public boolean shouldPrintFieldIdentityClause(AbstractSession session, java.lang.String qualifiedFieldName)
public void printFieldTypeSize(java.io.Writer writer, FieldDefinition field, FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws java.io.IOException
java.io.IOException
public boolean supportsUniqueColumns()
public void printFieldUnique(java.io.Writer writer, boolean shouldPrintFieldIdentityClause) throws java.io.IOException
java.io.IOException
public void writeParameterMarker(java.io.Writer writer, ParameterExpression expression, AbstractRecord record, DatabaseCall call) throws java.io.IOException
java.io.IOException
public java.sql.Array createArray(java.lang.String elementDataTypeName, java.lang.Object[] elements, AbstractSession session, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String structTypeName, java.lang.Object[] attributes, AbstractSession session, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Array createArray(java.lang.String elementDataTypeName, java.lang.Object[] elements, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String structTypeName, java.lang.Object[] attributes, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public boolean isXDBDocument(java.lang.Object obj)
public boolean shouldBindLiterals()
public void setShouldBindLiterals(boolean shouldBindLiterals)
public boolean isDynamicSQLRequiredForFunctions()
public java.lang.Object getRefValue(java.sql.Ref ref, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object getRefValue(java.sql.Ref ref, AbstractSession executionSession, java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public void printStoredFunctionReturnKeyWord(java.io.Writer writer) throws java.io.IOException
java.io.IOException
public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement)
public boolean shouldPrintLockingClauseAfterWhereClause()
public boolean supportsIndividualTableLocking()
public boolean supportsLockingQueriesWithMultipleTables()
public boolean shouldPrintAliasForUpdate()
public java.lang.String buildCreateIndex(java.lang.String fullTableName, java.lang.String indexName, java.lang.String... columnNames)
fullTableName
- qualified name of the table the index is to be created onindexName
- name of the indexcolumnNames
- one or more columns the index is created forpublic java.lang.String buildCreateIndex(java.lang.String fullTableName, java.lang.String indexName, java.lang.String qualifier, boolean isUnique, java.lang.String... columnNames)
fullTableName
- qualified name of the table the index is to be created onindexName
- name of the indexqualifier
- qualifier to construct qualified name of index if neededisUnique
- Indicates whether unique index is createdcolumnNames
- one or more columns the index is created forpublic java.lang.String buildDropIndex(java.lang.String fullTableName, java.lang.String indexName)
fullTableName
- qualified name of the table the index is to be removed fromindexName
- name of the indexpublic java.lang.String buildDropIndex(java.lang.String fullTableName, java.lang.String indexName, java.lang.String qualifier)
fullTableName
- qualified name of the table the index is to be removed fromindexName
- name of the indexqualifier
- qualifier to construct qualified name of index if neededpublic java.io.Writer buildSequenceObjectCreationWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment, int start) throws java.io.IOException
java.io.IOException
public java.io.Writer buildSequenceObjectDeletionWriter(java.io.Writer writer, java.lang.String fullSeqName) throws java.io.IOException
java.io.IOException
public java.io.Writer buildSequenceObjectAlterIncrementWriter(java.io.Writer writer, java.lang.String fullSeqName, int increment) throws java.io.IOException
java.io.IOException
public boolean isAlterSequenceObjectSupported()
public boolean supportsNestingOuterJoins()
public boolean supportsOuterJoinsWithBrackets()
public void freeTemporaryObject(java.lang.Object value) throws java.sql.SQLException
java.sql.SQLException
public void initializeConnectionData(java.sql.Connection connection) throws java.sql.SQLException
java.sql.SQLException
public void writeAddColumnClause(java.io.Writer writer, AbstractSession session, TableDefinition table, FieldDefinition field) throws java.io.IOException
java.io.IOException
public boolean supportsConnectionUserName()
initializeConnectionData(Connection)
.false
public java.lang.String getConnectionUserName()
java.lang.UnsupportedOperationException
- on every single call until overridden.EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference