Package liquibase.statement.core
Class AddPrimaryKeyStatement
java.lang.Object
liquibase.statement.AbstractSqlStatement
liquibase.statement.core.AddPrimaryKeyStatement
- All Implemented Interfaces:
- SqlStatement
- 
Field SummaryFields inherited from interface liquibase.statement.SqlStatementEMPTY_SQL_STATEMENT
- 
Constructor SummaryConstructorsConstructorDescriptionAddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, String columnNames, String constraintName) Deprecated.AddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName) 
- 
Method SummaryModifier and TypeMethodDescriptionsetClustered(Boolean clustered) setShouldValidate(boolean shouldValidate) setTablespace(String tablespace) booleanThe VALIDATE keyword defines whether a primary key constraint on a column in a table should be checked if it refers to a valid row or not.Methods inherited from class liquibase.statement.AbstractSqlStatementcontinueOnError, setContinueOnError, skipOnUnsupportedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface liquibase.statement.SqlStatementgetFormattedStatement
- 
Constructor Details- 
AddPrimaryKeyStatementpublic AddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, String columnNames, String constraintName) Deprecated.
- 
AddPrimaryKeyStatementpublic AddPrimaryKeyStatement(String catalogName, String schemaName, String tableName, ColumnConfig[] columns, String constraintName) 
 
- 
- 
Method Details- 
setTablespace
- 
getColumnNames
- 
isClustered
- 
setClustered
- 
shouldValidatepublic boolean shouldValidate()The VALIDATE keyword defines whether a primary key constraint on a column in a table should be checked if it refers to a valid row or not.- Returns:
- true if ENABLE VALIDATE (this is the default), or false if ENABLE NOVALIDATE.
 
- 
setShouldValidate- Parameters:
- shouldValidate- - if shouldValidate is set to FALSE then the constraint will be created with the 'ENABLE NOVALIDATE' mode. This means the constraint would be created, but that no check will be done to ensure old data has valid primary keys - only new data would be checked to see if it complies with the constraint logic. The default state for primary keys is to have 'ENABLE VALIDATE' set.
 
- 
getCatalogName
- 
getSchemaName
- 
getTableName
 
-