public class DropTableConstraint extends PostgresSqlPart
Generates a ALTER TABLE...DROP CONSTRAINT
statement for PostgreSQL.
ALTER TABLE IF EXISTS "person" DROP CONSTRAINT IF EXISTS "email_check"
Constructor and Description |
---|
DropTableConstraint() |
DropTableConstraint(String tableName,
String constraintName) |
Modifier and Type | Method and Description |
---|---|
void |
collectSqlFragment(CodeWriter writer) |
String |
getConstraintName() |
String |
getTableName() |
boolean |
isCascade() |
boolean |
isCheckIfConstraintExists()
Indicates if
IF EXISTS clause should be added to the ALTER TABLE...DROP CONSTRAINT statement before the constraint name (default true). |
boolean |
isCheckIfTableExists()
Indicates if the
IF EXISTS clause should be added to the ALTER TABLE statement before the table name (default true). |
boolean |
isRestrict() |
DropTableConstraint |
setCascade(boolean cascade) |
DropTableConstraint |
setCheckIfConstraintExists(boolean checkIfConstraintExists)
Indicates if
IF EXISTS clause should be added to the ALTER TABLE...DROP CONSTRAINT statement before the constraint name (default true). |
DropTableConstraint |
setCheckIfTableExists(boolean checkIfTableExists)
Indicates if the
IF EXISTS clause should be added to the ALTER TABLE statement before the table name (default true). |
DropTableConstraint |
setConstraintName(String constraintName) |
DropTableConstraint |
setPretty(boolean pretty) |
DropTableConstraint |
setTableName(String tableName) |
escapeKeyword
collectParameterValues, getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
public DropTableConstraint setPretty(boolean pretty)
public void collectSqlFragment(CodeWriter writer)
collectSqlFragment
in class SqlPart
public String getTableName()
public DropTableConstraint setTableName(String tableName)
public String getConstraintName()
public DropTableConstraint setConstraintName(String constraintName)
public boolean isCheckIfTableExists()
IF EXISTS
clause should be added to the ALTER TABLE
statement before the table name (default true).public DropTableConstraint setCheckIfTableExists(boolean checkIfTableExists)
IF EXISTS
clause should be added to the ALTER TABLE
statement before the table name (default true).public boolean isCheckIfConstraintExists()
IF EXISTS
clause should be added to the ALTER TABLE...DROP CONSTRAINT
statement before the constraint name (default true).public DropTableConstraint setCheckIfConstraintExists(boolean checkIfConstraintExists)
IF EXISTS
clause should be added to the ALTER TABLE...DROP CONSTRAINT
statement before the constraint name (default true).public boolean isCascade()
public DropTableConstraint setCascade(boolean cascade)
public boolean isRestrict()
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.