public class MySqlHelper extends GenericDbmsHelper
databasePlatform| Constructor and Description |
|---|
MySqlHelper(org.eclipse.persistence.platform.database.DatabasePlatform databasePlatform) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCopyColumnToAnotherTableStatement(String sourceTable,
String sourceColumnName,
String sourceIDColumnName,
String targetTable,
String targetColumnName,
String targetIDColumnName)
Get's the
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnName |
String |
getCopyColumnToAnotherTableStatement(String sourceTable,
String sourceColumnName,
String sourceIDColumnName1,
String sourceIDColumnName2,
String sourceIDColumnName3,
String targetTable,
String targetColumnName,
String targetIDColumnName1,
String targetIDColumnName2,
String targetIDColumnName3,
String sourceConditionFieldName,
String condition)
Get's the
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnName
and condition sourceConditionFieldName = condition |
String |
quoteObjectName(String name) |
boolean |
supportsColumnTypeChange()
Check if column type can be modified directly
|
StringBuilder |
writeColumnModifyString(StringBuilder builder,
DBAccessor.DBColumnInfo columnInfo) |
StringBuilder |
writeColumnRenameString(StringBuilder builder,
String oldName,
DBAccessor.DBColumnInfo newColumnInfo) |
Writer |
writeCreateTableStatement(Writer writer,
String tableName,
List<DBAccessor.DBColumnInfo> columns,
List<String> primaryKeyColumns)
Write create table statement to writer
TODO default Value of column not supported
|
String |
writeGetTableConstraints(String databaseName,
String tableName) |
StringBuilder |
writeSetNullableString(StringBuilder builder,
String tableName,
DBAccessor.DBColumnInfo columnInfo,
boolean nullable) |
convertToFieldDefinition, createStubAbstractSessionFromPlatform, getAddColumnStatement, getAddForeignKeyStatement, getAddPrimaryKeyConstraintStatement, getAddUniqueConstraintStatement, getAlterColumnStatement, getColumnUpdateStatementWhereColumnIsNull, getCreateIndexStatement, getCreateIndexStatement, getCreateTableStatement, getDropFKConstraintStatement, getDropIndexStatement, getDropPrimaryKeyStatement, getDropSequenceStatement, getDropTableColumnStatement, getDropTableStatement, getDropUniqueConstraintStatement, getRenameColumnStatement, getRenameColumnStatement, getSetNullableStatement, getTableConstraintsStatement, isConstraintSupportedAfterNullability, writeAddPrimaryKeyString, writeAlterTableClause, writeColumnType, writeDropPrimaryKeyStatement, writeDropTableColumnStatementpublic MySqlHelper(org.eclipse.persistence.platform.database.DatabasePlatform databasePlatform)
public boolean supportsColumnTypeChange()
DbmsHelpersupportsColumnTypeChange in interface DbmsHelpersupportsColumnTypeChange in class GenericDbmsHelperpublic String quoteObjectName(String name)
quoteObjectName in interface DbmsHelperquoteObjectName in class GenericDbmsHelperpublic StringBuilder writeColumnRenameString(StringBuilder builder, String oldName, DBAccessor.DBColumnInfo newColumnInfo)
writeColumnRenameString in class GenericDbmsHelperpublic StringBuilder writeColumnModifyString(StringBuilder builder, DBAccessor.DBColumnInfo columnInfo)
writeColumnModifyString in class GenericDbmsHelperpublic StringBuilder writeSetNullableString(StringBuilder builder, String tableName, DBAccessor.DBColumnInfo columnInfo, boolean nullable)
writeSetNullableString in class GenericDbmsHelperpublic String writeGetTableConstraints(String databaseName, String tableName)
writeGetTableConstraints in class GenericDbmsHelperpublic Writer writeCreateTableStatement(Writer writer, String tableName, List<DBAccessor.DBColumnInfo> columns, List<String> primaryKeyColumns)
GenericDbmsHelperwriteCreateTableStatement in class GenericDbmsHelperpublic String getCopyColumnToAnotherTableStatement(String sourceTable, String sourceColumnName, String sourceIDColumnName, String targetTable, String targetColumnName, String targetIDColumnName)
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnNamegetCopyColumnToAnotherTableStatement in interface DbmsHelpergetCopyColumnToAnotherTableStatement in class GenericDbmsHelpersourceTable - the source table namesourceColumnName - the source column namesourceIDColumnName - source key id column which would be used to math right rows for targetTabletargetTable - the destination table nametargetColumnName - the destination column nametargetIDColumnName - destination key id column name which should math sourceIDColumnNamepublic String getCopyColumnToAnotherTableStatement(String sourceTable, String sourceColumnName, String sourceIDColumnName1, String sourceIDColumnName2, String sourceIDColumnName3, String targetTable, String targetColumnName, String targetIDColumnName1, String targetIDColumnName2, String targetIDColumnName3, String sourceConditionFieldName, String condition)
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnName
and condition sourceConditionFieldName = conditiongetCopyColumnToAnotherTableStatement in interface DbmsHelpergetCopyColumnToAnotherTableStatement in class GenericDbmsHelpersourceTable - the source table namesourceColumnName - the source column namesourceIDColumnName1 - source key id column which would be used to math right rows for targetTablesourceIDColumnName2 - source key id column which would be used to math right rows for targetTablesourceIDColumnName3 - source key id column which would be used to math right rows for targetTabletargetTable - the destination table nametargetColumnName - the destination column nametargetIDColumnName1 - destination key id column name which should match sourceIDColumnName1targetIDColumnName2 - destination key id column name which should match sourceIDColumnName1targetIDColumnName3 - destination key id column name which should match sourceIDColumnName1sourceConditionFieldName - source key column name which should match conditioncondition - value which should match sourceConditionFieldNameCopyright © 2022 Apache Software Foundation. All rights reserved.