Record Class SchemaTypes.ColumnDefinition

java.lang.Object
java.lang.Record
app.ductape.sdk.database.types.SchemaTypes.ColumnDefinition
Enclosing class:
SchemaTypes

public static record SchemaTypes.ColumnDefinition(String name, String type, Integer length, Integer precision, Integer scale, Boolean nullable, Boolean primaryKey, Boolean autoIncrement, Boolean unique, Object defaultValue, SchemaTypes.ForeignKeyReference references, List<String> enumValues, String arrayType, String comment, String check) extends Record
type is DatabaseTypes.ColumnType name or a driver-specific string.
  • Constructor Details

    • ColumnDefinition

      public ColumnDefinition(String name, String type, Integer length, Integer precision, Integer scale, Boolean nullable, Boolean primaryKey, Boolean autoIncrement, Boolean unique, Object defaultValue, SchemaTypes.ForeignKeyReference references, List<String> enumValues, String arrayType, String comment, String check)
      Creates an instance of a ColumnDefinition record class.
      Parameters:
      name - the value for the name record component
      type - the value for the type record component
      length - the value for the length record component
      precision - the value for the precision record component
      scale - the value for the scale record component
      nullable - the value for the nullable record component
      primaryKey - the value for the primaryKey record component
      autoIncrement - the value for the autoIncrement record component
      unique - the value for the unique record component
      defaultValue - the value for the defaultValue record component
      references - the value for the references record component
      enumValues - the value for the enumValues record component
      arrayType - the value for the arrayType record component
      comment - the value for the comment record component
      check - the value for the check record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • length

      public Integer length()
      Returns the value of the length record component.
      Returns:
      the value of the length record component
    • precision

      public Integer precision()
      Returns the value of the precision record component.
      Returns:
      the value of the precision record component
    • scale

      public Integer scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • nullable

      public Boolean nullable()
      Returns the value of the nullable record component.
      Returns:
      the value of the nullable record component
    • primaryKey

      public Boolean primaryKey()
      Returns the value of the primaryKey record component.
      Returns:
      the value of the primaryKey record component
    • autoIncrement

      public Boolean autoIncrement()
      Returns the value of the autoIncrement record component.
      Returns:
      the value of the autoIncrement record component
    • unique

      public Boolean unique()
      Returns the value of the unique record component.
      Returns:
      the value of the unique record component
    • defaultValue

      public Object defaultValue()
      Returns the value of the defaultValue record component.
      Returns:
      the value of the defaultValue record component
    • references

      public SchemaTypes.ForeignKeyReference references()
      Returns the value of the references record component.
      Returns:
      the value of the references record component
    • enumValues

      public List<String> enumValues()
      Returns the value of the enumValues record component.
      Returns:
      the value of the enumValues record component
    • arrayType

      public String arrayType()
      Returns the value of the arrayType record component.
      Returns:
      the value of the arrayType record component
    • comment

      public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component
    • check

      public String check()
      Returns the value of the check record component.
      Returns:
      the value of the check record component