public class H2Helper extends GenericDbmsHelper
databasePlatform
Constructor and Description |
---|
H2Helper(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 |
getRenameColumnStatement(String tableName,
String oldName,
DBAccessor.DBColumnInfo columnInfo)
Generate rename column statement
|
boolean |
supportsColumnTypeChange()
Check if column type can be modified directly
|
StringBuilder |
writeColumnModifyString(StringBuilder builder,
DBAccessor.DBColumnInfo columnInfo) |
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, getSetNullableStatement, getTableConstraintsStatement, isConstraintSupportedAfterNullability, quoteObjectName, writeAddPrimaryKeyString, writeAlterTableClause, writeColumnRenameString, writeColumnType, writeCreateTableStatement, writeDropPrimaryKeyStatement, writeDropTableColumnStatement
public H2Helper(org.eclipse.persistence.platform.database.DatabasePlatform databasePlatform)
public boolean supportsColumnTypeChange()
DbmsHelper
supportsColumnTypeChange
in interface DbmsHelper
supportsColumnTypeChange
in class GenericDbmsHelper
public String getRenameColumnStatement(String tableName, String oldName, DBAccessor.DBColumnInfo columnInfo)
DbmsHelper
getRenameColumnStatement
in interface DbmsHelper
getRenameColumnStatement
in class GenericDbmsHelper
columnInfo
- definition of new columnpublic StringBuilder writeColumnModifyString(StringBuilder builder, DBAccessor.DBColumnInfo columnInfo)
writeColumnModifyString
in class GenericDbmsHelper
public StringBuilder writeSetNullableString(StringBuilder builder, String tableName, DBAccessor.DBColumnInfo columnInfo, boolean nullable)
writeSetNullableString
in class GenericDbmsHelper
public String writeGetTableConstraints(String databaseName, String tableName)
writeGetTableConstraints
in class GenericDbmsHelper
public 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 targetIDColumnName
getCopyColumnToAnotherTableStatement
in interface DbmsHelper
getCopyColumnToAnotherTableStatement
in class GenericDbmsHelper
sourceTable
- the source table namesourceColumnName
- the source column namesourceIDColumnName
- source key id column which would be used to math right rows for targetTable
targetTable
- the destination table nametargetColumnName
- the destination column nametargetIDColumnName
- destination key id column name which should math sourceIDColumnName
public 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
= condition
getCopyColumnToAnotherTableStatement
in interface DbmsHelper
getCopyColumnToAnotherTableStatement
in class GenericDbmsHelper
sourceTable
- the source table namesourceColumnName
- the source column namesourceIDColumnName1
- source key id column which would be used to math right rows for targetTable
sourceIDColumnName2
- source key id column which would be used to math right rows for targetTable
sourceIDColumnName3
- source key id column which would be used to math right rows for targetTable
targetTable
- the destination table nametargetColumnName
- the destination column nametargetIDColumnName1
- destination key id column name which should match sourceIDColumnName1
targetIDColumnName2
- destination key id column name which should match sourceIDColumnName1
targetIDColumnName3
- destination key id column name which should match sourceIDColumnName1
sourceConditionFieldName
- source key column name which should match condition
condition
- value which should match sourceConditionFieldName
Copyright © 2022 Apache Software Foundation. All rights reserved.