Class ForeignKeyConstraint

java.lang.Object
dev.frostlake.metastore.model.ForeignKeyConstraint

public class ForeignKeyConstraint extends Object
Represents a FOREIGN KEY constraint (final not enforced, final metadata only)
  • Constructor Details

    • ForeignKeyConstraint

      public ForeignKeyConstraint(String constraintName, List<String> columnNames, String referencedTable, List<String> referencedColumns, String onDelete, String onUpdate, Boolean rely)
      Parameters:
      constraintName - the name from an explicit CONSTRAINT <name> clause; null or blank when the constraint was declared without one, in which case it is auto-named SYS_CONSTRAINT_<uuid> the way Snowflake does (see ConstraintNames).
    • ForeignKeyConstraint

      public ForeignKeyConstraint(String constraintName, List<String> columnNames, String referencedTable, List<String> referencedColumns, String onDelete, String onUpdate)
  • Method Details

    • getConstraintName

      public String getConstraintName()
    • setConstraintName

      public void setConstraintName(String constraintName)
      Rename it in place — ALTER TABLE … RENAME CONSTRAINT.
    • getColumnNames

      public List<String> getColumnNames()
    • getReferencedTable

      public String getReferencedTable()
    • getReferencedColumns

      public List<String> getReferencedColumns()
    • getOnDelete

      public String getOnDelete()
    • getOnUpdate

      public String getOnUpdate()
    • getRely

      public Boolean getRely()
    • toString

      public String toString()
      Overrides:
      toString in class Object