| org.h2.schema.SchemaObjectBase org.h2.constraint.Constraint
All known Subclasses: org.h2.constraint.ConstraintUnique, org.h2.constraint.ConstraintCheck, org.h2.constraint.ConstraintReferential,
Field Summary | |
final public static String | CHECK The constraint type name for check constraints. | final public static String | PRIMARY_KEY The constraint type name for primary key constraints. | final public static String | REFERENTIAL The constraint type name for referential constraints. | final public static String | UNIQUE The constraint type name for unique constraints. | protected Table | table The table for which this constraint is defined. |
CHECK | final public static String CHECK(Code) | | The constraint type name for check constraints.
|
PRIMARY_KEY | final public static String PRIMARY_KEY(Code) | | The constraint type name for primary key constraints.
|
REFERENTIAL | final public static String REFERENTIAL(Code) | | The constraint type name for referential constraints.
|
UNIQUE | final public static String UNIQUE(Code) | | The constraint type name for unique constraints.
|
table | protected Table table(Code) | | The table for which this constraint is defined.
|
checkExistingData | abstract public void checkExistingData(Session session) throws SQLException(Code) | | Check the existing data. This method is called if the constraint is added
after data has been inserted into the table.
Parameters: session - the session |
checkRow | abstract public void checkRow(Session session, Table t, Row oldRow, Row newRow) throws SQLException(Code) | | Check if this row fulfils the constraint.
This method throws an exception if not.
Parameters: session - the session Parameters: t - the table Parameters: oldRow - the old row Parameters: newRow - the new row |
containsColumn | abstract public boolean containsColumn(Column col)(Code) | | Check if this constraint contains the given column.
Parameters: col - the column true if it does |
getConstraintType | abstract public String getConstraintType()(Code) | | The constraint type name
the name |
getCreateSQLWithoutIndexes | abstract public String getCreateSQLWithoutIndexes()(Code) | | Get the SQL statement to create this constraint.
the SQL statement |
getShortDescription | abstract public String getShortDescription()(Code) | | Get a short description of the constraint. This includes the constraint
name (if set), and the constraint expression.
the description |
getType | public int getType()(Code) | | |
isBefore | abstract public boolean isBefore()(Code) | | Check if this constraint needs to be checked before updating the data.
true if it must be checked before updating |
setIndexOwner | abstract public void setIndexOwner(Index index)(Code) | | This index is now the owner of the specified index.
Parameters: index - |
usesIndex | abstract public boolean usesIndex(Index index)(Code) | | Check if this constraint needs the specified index.
Parameters: index - the index true if the index is used |
|
|