Interface IConstraint

All Superinterfaces:
ISearchPath, IStatement
All Known Subinterfaces:
IConstraintFk, IConstraintPk
All Known Implementing Classes:
AbstractConstraint, ChConstraint, MetaConstraint, MsConstraint, MsConstraintCheck, MsConstraintFk, MsConstraintPk, PgConstraint, PgConstraintCheck, PgConstraintExclude, PgConstraintFk, PgConstraintPk

public interface IConstraint extends ISearchPath
Interface for database table constraints. Provides common functionality for all constraint types including primary keys, foreign keys, unique constraints, and check constraints.
  • Method Details

    • isPrimaryKey

      default boolean isPrimaryKey()
      Checks if this constraint is a primary key constraint.
      Returns:
      true if this is a primary key constraint
    • getDefinition

      String getDefinition()
      Gets the SQL definition of this constraint.
      Returns:
      the constraint definition
    • getColumns

      Collection<String> getColumns()
      Gets the columns involved in this constraint.
      Returns:
      a collection of column names
    • containsColumn

      boolean containsColumn(String name)
      Checks if this constraint involves the specified column.
      Parameters:
      name - the column name to check
      Returns:
      true if the column is part of this constraint
    • getTableName

      String getTableName()
      Gets the name of the table this constraint belongs to.
      Returns:
      the table name