Package com.ptsmods.mysqlw.table
Class ColumnDefault
java.lang.Object
com.ptsmods.mysqlw.table.ColumnDefault
The default value of a column.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ColumnDefault
Whenever a new row is made, the value of this column is set to the currentTIMESTAMP
.static final ColumnDefault
Sets the default value of a column to be null, this is the default behaviour. -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnDefault
Create a default value for a column.getDef()
-
Field Details
-
NULL
Sets the default value of a column to be null, this is the default behaviour. When using this in aColumnStructure
, the column will always allow null values. -
CURRENT_TIMESTAMP
Whenever a new row is made, the value of this column is set to the currentTIMESTAMP
.
-
-
Method Details
-
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
- Returns:
- The default value of this ColumnDefault.
- See Also:
-
getDefString
- Returns:
- The String representation of the default value of this ColumnDefault.
- See Also:
-