public class CreateTableColumn extends MySqlPart
Generates a column definition for a CREATE TABLE
statement for MySQL.
email TEXT NOT NULL, CONSTRAINT "email_check" CHECK (email LIKE '%@%')
Constructor and Description |
---|
CreateTableColumn() |
CreateTableColumn(String columnName,
TableColumnType type) |
CreateTableColumn(String columnName,
TableColumnType type,
Integer length) |
CreateTableColumn(String columnName,
TableColumnType type,
Integer length,
Integer scale) |
escapeKeyword, placeBackTicks
collectParameterValues, getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
public CreateTableColumn()
public CreateTableColumn(String columnName, TableColumnType type, Integer length, Integer scale)
public CreateTableColumn(String columnName, TableColumnType type, Integer length)
public CreateTableColumn(String columnName, TableColumnType type)
public CreateTableColumn setPretty(boolean pretty)
public void collectSqlFragment(CodeWriter writer)
collectSqlFragment
in class SqlPart
public String getColumnName()
public CreateTableColumn setColumnName(String columnName)
public TableColumnType getType()
public CreateTableColumn setType(TableColumnType type)
public Integer getLength()
public CreateTableColumn setLength(Integer length)
public Integer getScale()
public CreateTableColumn setScale(Integer scale)
public boolean isNullable()
public CreateTableColumn setNullable(boolean nullable)
public boolean isUnique()
public CreateTableColumn setUnique(boolean unique)
public String getDefaultValue()
public CreateTableColumn setDefaultValue(String defaultValue)
public String getCheckConstraintCondition()
public CreateTableColumn setCheckConstraintCondition(String checkConstraintCondition)
public String getCheckConstraintName()
public CreateTableColumn setCheckConstraintName(String checkConstraintName)
public CreateTableColumn setCheckConstraint(String checkConstraintName, String condition)
public boolean isPrimaryKey()
public CreateTableColumn setPrimaryKey(boolean primaryKey)
public boolean isAutoIncrement()
public CreateTableColumn setAutoIncrement(boolean autoIncrement)
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.