com.ptsmods.mysqlw.table.ColumnAttributes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of MySQLw Show documentation
Show all versions of MySQLw Show documentation
A wrapper for MySQL connections
package com.ptsmods.mysqlw.table;
/**
* Certain attributes the type of a column may have.
*/
public enum ColumnAttributes {
/**
* Marks any String type as a binary string.
*/
BINARY,
/**
* Store any number type as unsigned.
*/
UNSIGNED,
/**
* Same as {@link #UNSIGNED} but also fills the number with zeros to fit the length.
*/
UNSIGED_ZEROFILL("UNSIGNED ZEROFILL"),
/**
* Store the current {@link ColumnType#TIMESTAMP TIMESTAMP} in this column whenever the row gets updated.
*/
UPDATE_CURRENT_TIMESTAMP("on update CURRENT_TIMESTAMP");
private final String s;
ColumnAttributes() {
this(null);
}
ColumnAttributes(String s) {
this.s = s;
}
@Override
public String toString() {
return s == null ? name() : s;
}
}