Class ColumnDefault

java.lang.Object
com.ptsmods.mysqlw.table.ColumnDefault

public class ColumnDefault extends Object
The default value of a column.
  • Field Details

    • NULL

      public static final ColumnDefault NULL
      Sets the default value of a column to be null, this is the default behaviour. When using this in a ColumnStructure, the column will always allow null values.
    • CURRENT_TIMESTAMP

      public static final ColumnDefault CURRENT_TIMESTAMP
      Whenever a new row is made, the value of this column is set to the current TIMESTAMP.
  • Method Details

    • def

      public static ColumnDefault def(Object def)
      Create a default value for a column.
      Parameters:
      def - The value to use as a default.
      Returns:
      A new ColumnDefault with the given value as a default value.
    • getDef

      public Object getDef()
      Returns:
      The default value of this ColumnDefault.
      See Also:
    • getDefString

      public String getDefString()
      Returns:
      The String representation of the default value of this ColumnDefault.
      See Also: