Class MySQLPlatform
- java.lang.Object
-
- org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
- org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
- org.eclipse.persistence.platform.database.DatabasePlatform
-
- org.eclipse.persistence.platform.database.MySQLPlatform
-
- All Implemented Interfaces:
Serializable
,Cloneable
,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>
,org.eclipse.persistence.internal.databaseaccess.Platform
public class MySQLPlatform extends DatabasePlatform
Purpose: Provides MySQL specific behavior.
Responsibilities:
- Native SQL for Date, Time, & Timestamp.
- Native sequencing.
- Mapping of class types to database types for the schema framework.
- Pessimistic locking.
- Platform specific operators.
- Since:
- OracleAS TopLink 10g (10.1.3)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
-
-
Constructor Summary
Constructors Constructor Description MySQLPlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
buildProcedureCallString(StoredProcedureCall call, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord row)
Return the stored procedure syntax for this platform.ValueReadQuery
buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing.boolean
canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
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.String
getConstraintDeletionString()
INTERNAL: Used for constraint deletion.String
getDropDatabaseSchemaString(String schema)
Return the drop schema definition.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.String
getUniqueConstraintDeletionString()
INTERNAL: Used for unique constraint deletion.void
initializeConnectionData(Connection connection)
INTERNAL: Allow initialization from the connection.boolean
isForUpdateCompatibleWithDistinct()
INTERNAL: Indicates whether SELECT DISTINCT ...boolean
isFractionalTimeSupported()
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.void
printStoredFunctionReturnKeyWord(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 BIGINTboolean
requiresProcedureBrackets()
Used for stored procedure creation: MySQL platforms need brackets around arguments declaration even if no arguments exist.boolean
requiresTableInIndexDropDDL()
INTERNAL: Return if this database requires the table name when dropping an index.boolean
shouldAlwaysUseTempStorageForModifyAll()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries.boolean
shouldPrintForUpdateClause()
INTERNAL: MySQL FOR UPDATE clause has to be the lastboolean
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
supportsCountDistinctWithMultipleFields()
INTERNAL: Indicates whether the platform supports the count distinct function with multiple fields.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, org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform platform)
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, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCallWithReturning, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBuildCallWithReturning, commitTransaction, convertToDatabaseType, copyInto, createArray, createArray, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getAssignmentString, getBatchBeginString, getBatchDelimiterString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnection, getConnectionUserName, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getCustomModifyValueForCall, getDefaultSequenceTableName, getDriverSupportsNVarChar, getDropCascadeString, getFieldTypeDefinition, getFieldTypes, getIndexNamePrefix, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxFieldNameSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getObjectFromResultSet, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentSetter, getProcedureArgumentString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSelectForUpdateWaitString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, getUseNationalCharacterVaryingTypeForString, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, hasPartitioningCallback, initialize, isAlterSequenceObjectSupported, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isJDBCExecuteCompliant, isLobCompatibleWithDistinct, isLockTimeoutException, isNullAllowedInSelectClause, isOutputAllowWithResultSet, isRowCountOutputParameterRequired, isXDBDocument, maximumNumericValues, minimumNumericValues, minimumTimeIncrement, prepareBatchStatement, printFieldNotNullClause, printFieldNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseCustomModifyForCall, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsConnectionUserName, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsIndexes, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, supportsVPD, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, wasFailureCommunicationBased, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeInsertIntoTableSql, writeLOB, writeParameterMarker, writeTableCreationSuffix
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, buildSelectQueryForSequenceObject, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, 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, supportsNativeSequenceNumbers, supportsSequenceObjects, toString, usesPlatformDefaultSequence
-
-
-
-
Method Detail
-
initializeConnectionData
public void initializeConnectionData(Connection connection) throws SQLException
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
INTERNAL: Allow initialization from the connection.- Overrides:
initializeConnectionData
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Throws:
SQLException
-
isFractionalTimeSupported
public boolean isFractionalTimeSupported()
-
buildSelectQueryForIdentity
public ValueReadQuery buildSelectQueryForIdentity()
INTERNAL: Build the identity query for native sequencing.- Overrides:
buildSelectQueryForIdentity
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
buildProcedureCallString
public String buildProcedureCallString(StoredProcedureCall call, org.eclipse.persistence.internal.sessions.AbstractSession session, org.eclipse.persistence.internal.sessions.AbstractRecord row)
Return the stored procedure syntax for this platform.- Overrides:
buildProcedureCallString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
computeMaxRowsForSQL
public 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. These limits tend to be used in two ways. 1. MaxRows is the index of the last row to be returned (like JDBC maxResults) 2. MaxRows is the number of rows to be returned MySQL uses case #2 and therefore the maxResults has to be altered based on the firstResultIndex- Overrides:
computeMaxRowsForSQL
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Parameters:
firstResultIndex
-maxResults
-- See Also:
MySQLPlatform
-
canBatchWriteWithOptimisticLocking
public boolean canBatchWriteWithOptimisticLocking(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call)
INTERNAL: Supports Batch Writing with Optimistic Locking.- Overrides:
canBatchWriteWithOptimisticLocking
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getConstraintDeletionString
public String getConstraintDeletionString()
INTERNAL: Used for constraint deletion.- Overrides:
getConstraintDeletionString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getUniqueConstraintDeletionString
public String getUniqueConstraintDeletionString()
INTERNAL: Used for unique constraint deletion.- Overrides:
getUniqueConstraintDeletionString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getFunctionCallHeader
public String getFunctionCallHeader()
Used for stored function calls.- Overrides:
getFunctionCallHeader
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureCallTail
public String getProcedureCallTail()
Used for sp calls.- Overrides:
getProcedureCallTail
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getSelectForUpdateString
public String getSelectForUpdateString()
INTERNAL: Used for pessimistic locking.- Overrides:
getSelectForUpdateString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
isForUpdateCompatibleWithDistinct
public boolean isForUpdateCompatibleWithDistinct()
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
INTERNAL: Indicates whether SELECT DISTINCT ... FOR UPDATE is allowed by the platform (Oracle doesn't allow this).- Overrides:
isForUpdateCompatibleWithDistinct
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getTimestampQuery
public ValueReadQuery getTimestampQuery()
INTERNAL: This method returns the query to select the timestamp from the server for MySQL.- Specified by:
getTimestampQuery
in interfaceorg.eclipse.persistence.internal.databaseaccess.Platform
- Overrides:
getTimestampQuery
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
isMySQL
public boolean isMySQL()
Answers whether platform is MySQL.- Specified by:
isMySQL
in interfaceorg.eclipse.persistence.internal.databaseaccess.Platform
- Overrides:
isMySQL
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
printFieldIdentityClause
public void printFieldIdentityClause(Writer writer) throws ValidationException
INTERNAL: Append the receiver's field 'identity' constraint clause to a writer.- Overrides:
printFieldIdentityClause
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Throws:
ValidationException
-
shouldUseJDBCOuterJoinSyntax
public boolean shouldUseJDBCOuterJoinSyntax()
INTERNAL: JDBC defines an outer join syntax which many drivers do not support. So we normally avoid it.- Overrides:
shouldUseJDBCOuterJoinSyntax
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsIdentity
public boolean supportsIdentity()
INTERNAL: Indicates whether the platform supports identity. MySQL supports native sequencing through AUTO_INCREMENT field types.- Overrides:
supportsIdentity
in classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
supportsCountDistinctWithMultipleFields
public boolean supportsCountDistinctWithMultipleFields()
INTERNAL: Indicates whether the platform supports the count distinct function with multiple fields.- Overrides:
supportsCountDistinctWithMultipleFields
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
requiresTableInIndexDropDDL
public boolean requiresTableInIndexDropDDL()
INTERNAL: Return if this database requires the table name when dropping an index.- Overrides:
requiresTableInIndexDropDDL
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsGlobalTempTables
public boolean supportsGlobalTempTables()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries.- Overrides:
supportsGlobalTempTables
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsIndividualTableLocking
public boolean supportsIndividualTableLocking()
INTERNAL: Indicates whether locking clause could be selectively applied only to some tables in a ReadQuery. Example: the following locks the rows in SALARY table, doesn't lock the rows in EMPLOYEE table: on Oracle platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WHERE ... FOR UPDATE t1.SALARY on SQLServer platform (method returns true): SELECT t0.EMP_ID..., t1.SALARY FROM EMPLOYEE t0, SALARY t1 WITH (UPDLOCK) WHERE ...- Overrides:
supportsIndividualTableLocking
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsStoredFunctions
public boolean supportsStoredFunctions()
- Overrides:
supportsStoredFunctions
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
supportsAutoConversionToNumericForArithmeticOperations
public 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 ... SELECT ... WHERE ... t0.MANAGED_ORDER_VARCHAR BETWEEN 1 AND 4 ...- Overrides:
supportsAutoConversionToNumericForArithmeticOperations
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getDropDatabaseSchemaString
public String getDropDatabaseSchemaString(String schema)
Return the drop schema definition. Subclasses should override as needed.- Overrides:
getDropDatabaseSchemaString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldAlwaysUseTempStorageForModifyAll
public boolean shouldAlwaysUseTempStorageForModifyAll()
INTERNAL: MySQL supports temp tables for update-all, delete-all queries.- Overrides:
shouldAlwaysUseTempStorageForModifyAll
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintStoredProcedureArgumentNameInCall
public boolean shouldPrintStoredProcedureArgumentNameInCall()
INTERNAL: MySQL stored procedure calls do not require the argument name be printed in the call string e.g. call MyStoredProc(?) instead of call MyStoredProc(myvariable = ?)- Overrides:
shouldPrintStoredProcedureArgumentNameInCall
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintForUpdateClause
public boolean shouldPrintForUpdateClause()
INTERNAL: MySQL FOR UPDATE clause has to be the last- Overrides:
shouldPrintForUpdateClause
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getIdentifierQuoteCharacter
public String getIdentifierQuoteCharacter()
Deprecated.INTERNAL: MySQL uses ' to allow identifier to have spaces.- Overrides:
getIdentifierQuoteCharacter
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Returns:
- The quote character for this platform
- See Also:
DatasourcePlatform.getStartDelimiter()
,DatasourcePlatform.getEndDelimiter()
-
getInOutputProcedureToken
public String getInOutputProcedureToken()
INTERNAL: MySQL uses the INOUT keyword for this.- Overrides:
getInOutputProcedureToken
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureAsString
public String getProcedureAsString()
MySQL does not use the AS token.- Overrides:
getProcedureAsString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
shouldPrintOutputTokenAtStart
public boolean shouldPrintOutputTokenAtStart()
INTERNAL: MySQL requires the direction at the start of the argument.- Overrides:
shouldPrintOutputTokenAtStart
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureCallHeader
public String getProcedureCallHeader()
INTERNAL: Used for stored procedure calls.- Overrides:
getProcedureCallHeader
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureBeginString
public String getProcedureBeginString()
INTERNAL: MySQL requires BEGIN.- Overrides:
getProcedureBeginString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getProcedureEndString
public String getProcedureEndString()
INTERNAL: MySQL requires END.- Overrides:
getProcedureEndString
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
writeUpdateOriginalFromTempTableSql
public void writeUpdateOriginalFromTempTableSql(Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, Collection pkFields, Collection assignedFields) throws IOException
INTERNAL: Writes MySQL specific SQL for accessing temp tables for update-all queries.- Overrides:
writeUpdateOriginalFromTempTableSql
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Throws:
IOException
-
writeDeleteFromTargetTableUsingTempTableSql
public void writeDeleteFromTargetTableUsingTempTableSql(Writer writer, org.eclipse.persistence.internal.helper.DatabaseTable table, org.eclipse.persistence.internal.helper.DatabaseTable targetTable, Collection pkFields, Collection targetPkFields, org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform platform) throws IOException
INTERNAL: Writes MySQL specific SQL for accessing temp tables for delete-all queries.- Overrides:
writeDeleteFromTargetTableUsingTempTableSql
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Throws:
IOException
-
printSQLSelectStatement
public void printSQLSelectStatement(org.eclipse.persistence.internal.databaseaccess.DatabaseCall call, org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter printer, org.eclipse.persistence.internal.expressions.SQLSelectStatement statement)
Description copied from class:org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
INTERNAL: Print the SQL representation of the statement on a stream, storing the fields in the DatabaseCall.- Overrides:
printSQLSelectStatement
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
requiresProcedureBrackets
public boolean requiresProcedureBrackets()
Used for stored procedure creation: MySQL platforms need brackets around arguments declaration even if no arguments exist.- Overrides:
requiresProcedureBrackets
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
printStoredFunctionReturnKeyWord
public void printStoredFunctionReturnKeyWord(Writer writer) throws IOException
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- Overrides:
printStoredFunctionReturnKeyWord
in classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
- Throws:
IOException
-
-