|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.MySQLPlatform
public class MySQLPlatform
Purpose: Provides MySQL specific behavior.
Responsibilities:
| Field Summary |
|---|
| Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform |
|---|
DEFAULT_VARCHAR_SIZE |
| Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
|---|
DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, Types_NCLOB |
| Constructor Summary | |
|---|---|
MySQLPlatform()
|
|
| Method Summary | |
|---|---|
String |
buildProcedureCallString(StoredProcedureCall call,
org.eclipse.persistence.internal.sessions.AbstractSession session)
Return the proc syntax for this platform. |
ValueReadQuery |
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing. |
boolean |
canBatchWriteWithOptimisticLocking()
INTERNAL: Supports Batch Writing with Optimistic Locking. |
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. |
int |
executeBatch(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 (if useNativeBatchWriting is enabled, and the call uses optimistic locking). |
String |
getConstraintDeletionString()
INTERNAL: Used for constraint deletion. |
String |
getFunctionCallHeader()
Used for stored function calls. |
String |
getIdentifierQuoteCharacter()
Deprecated. |
String |
getInOutputProcedureToken()
INTERNAL: MySQL uses the INOUT keyword for this. |
String |
getProcedureAsString()
MySQL does not use the AS token. |
String |
getProcedureBeginString()
INTERNAL: MySQL requires BEGIN. |
String |
getProcedureCallHeader()
INTERNAL: Used for stored procedure calls. |
String |
getProcedureCallTail()
Used for sp calls. |
String |
getProcedureEndString()
INTERNAL: MySQL requires END. |
String |
getSelectForUpdateString()
INTERNAL: Used for pessimistic locking. |
ValueReadQuery |
getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for MySQL. |
boolean |
isMySQL()
Answers whether platform is MySQL. |
void |
printFieldIdentityClause(Writer writer)
INTERNAL: Append the receiver's field 'identity' constraint clause to a writer. |
void |
printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall. |
boolean |
shouldAlwaysUseTempStorageForModifyAll()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries. |
boolean |
shouldPrintOutputTokenAtStart()
INTERNAL: MySQL requires the direction at the start of the argument. |
boolean |
shouldPrintStoredProcedureArgumentNameInCall()
INTERNAL: MySQL stored procedure calls do not require the argument name be printed in the call string e.g. |
boolean |
shouldUseJDBCOuterJoinSyntax()
INTERNAL: JDBC defines an outer join syntax which many drivers do not support. |
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 |
supportsGlobalTempTables()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries. |
boolean |
supportsIdentity()
INTERNAL: Indicates whether the platform supports identity. |
boolean |
supportsIndividualTableLocking()
INTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery. |
boolean |
supportsStoredFunctions()
|
void |
writeDeleteFromTargetTableUsingTempTableSql(Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
org.eclipse.persistence.internal.helper.DatabaseTable targetTable,
Collection pkFields,
Collection targetPkFields)
INTERNAL: Writes MySQL specific SQL for accessing temp tables for delete-all queries. |
void |
writeUpdateOriginalFromTempTableSql(Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
Collection pkFields,
Collection assignedFields)
INTERNAL: Writes MySQL specific SQL for accessing temp tables for update-all queries. |
| Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform |
|---|
addBatch, addStructConverter, allowsSizeInProcedureArguments, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildCallWithReturning, buildCreateIndex, buildDropIndex, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getCastSizeForVarcharParameter, getClassTypes, getConnection, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTempTableForTable, getTransactionIsolation, getTypeConverters, initialize, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isForUpdateCompatibleWithDistinct, isInformixOuterJoin, isLockTimeoutException, isNullAllowedInSelectClause, isXDBDocument, maximumNumericValues, minimumNumericValues, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, rollbackTransaction, setCastSizeForVarcharParameter, setCursorCode, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPingSQL, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsForeignKeyConstraints, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNativeSequenceNumbers, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsSequenceObjects, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker |
| Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform |
|---|
addSequence, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isODBC, isOracle, isOracle9, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, toString, usesPlatformDefaultSequence |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MySQLPlatform()
| Method Detail |
|---|
public ValueReadQuery buildSelectQueryForIdentity()
buildSelectQueryForIdentity in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public String buildProcedureCallString(StoredProcedureCall call,
org.eclipse.persistence.internal.sessions.AbstractSession session)
buildProcedureCallString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public int computeMaxRowsForSQL(int firstResultIndex,
int maxResults)
computeMaxRowsForSQL in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformreadQuery - firstResultIndex - maxResults - MySQLPlatform
public int executeBatch(Statement statement,
boolean isStatementPrepared)
throws SQLException
executeBatch in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformisStatementPrepared - - flag is set to true if this statement is prepared
SQLExceptionpublic boolean canBatchWriteWithOptimisticLocking()
public String getConstraintDeletionString()
getConstraintDeletionString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getFunctionCallHeader()
getFunctionCallHeader in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getProcedureCallTail()
getProcedureCallTail in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getSelectForUpdateString()
getSelectForUpdateString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.PlatformgetTimestampQuery in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatformpublic boolean isMySQL()
isMySQL in interface org.eclipse.persistence.internal.databaseaccess.PlatformisMySQL in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
public void printFieldIdentityClause(Writer writer)
throws ValidationException
printFieldIdentityClause in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformValidationExceptionpublic boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsIdentity()
supportsIdentity in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsGlobalTempTables()
supportsGlobalTempTables in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsIndividualTableLocking()
supportsIndividualTableLocking in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsStoredFunctions()
supportsStoredFunctions in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean supportsAutoConversionToNumericForArithmeticOperations()
supportsAutoConversionToNumericForArithmeticOperations in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldAlwaysUseTempStorageForModifyAll()
shouldAlwaysUseTempStorageForModifyAll in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldPrintStoredProcedureArgumentNameInCall()
shouldPrintStoredProcedureArgumentNameInCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getIdentifierQuoteCharacter()
getIdentifierQuoteCharacter in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformDatasourcePlatform.getStartDelimiter(),
DatasourcePlatform.getEndDelimiter()public String getInOutputProcedureToken()
getInOutputProcedureToken in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getProcedureAsString()
getProcedureAsString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic boolean shouldPrintOutputTokenAtStart()
shouldPrintOutputTokenAtStart in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getProcedureCallHeader()
getProcedureCallHeader in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getProcedureBeginString()
getProcedureBeginString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformpublic String getProcedureEndString()
getProcedureEndString in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
public void writeUpdateOriginalFromTempTableSql(Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
Collection pkFields,
Collection assignedFields)
throws IOException
writeUpdateOriginalFromTempTableSql in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatformIOException
public void writeDeleteFromTargetTableUsingTempTableSql(Writer writer,
org.eclipse.persistence.internal.helper.DatabaseTable table,
org.eclipse.persistence.internal.helper.DatabaseTable targetTable,
Collection pkFields,
Collection targetPkFields)
throws IOException
IOException
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call,
org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer,
org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
printSQLSelectStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||