public interface AlterTableAlterStep<T>
ALTER TABLE
DSL used to ALTER
columns.
XYZ*Step
types directly from client code
It is usually not recommended to reference any XYZ*Step
types
directly from client code, or assign them to local variables. When writing
dynamic SQL, creating a statement's components dynamically, and passing them
to the DSL API statically is usually a better choice. See the manual's
section about dynamic SQL for details: https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql.
Drawbacks of referencing the XYZ*Step
types directly:
Modifier and Type | Method and Description |
---|---|
@NotNull AlterTableFinalStep |
default_(Field<T> expression)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
default_(T literal)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
defaultValue(Field<T> expression)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
defaultValue(T literal)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
dropDefault()
Drop the column
DEFAULT . |
@NotNull AlterTableFinalStep |
dropNotNull()
Make the column nullable.
|
@NotNull AlterTableFinalStep |
set(DataType<?> type)
Specify a new column data type.
|
@NotNull AlterTableFinalStep |
setDefault(Field<T> expression)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
setDefault(T literal)
Specify a new column
DEFAULT . |
@NotNull AlterTableFinalStep |
setNotNull()
Make the column
NOT NULL . |
@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep defaultValue(T literal)
DEFAULT
.
This is an alias for default_(Object)
.
@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep defaultValue(Field<T> expression)
DEFAULT
.
This is an alias for default_(Field)
.
@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep default_(T literal)
DEFAULT
.@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep default_(Field<T> expression)
DEFAULT
.@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep setDefault(T literal)
DEFAULT
.@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep setDefault(Field<T> expression)
DEFAULT
.@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep dropDefault()
DEFAULT
.@NotNull @Support(value={CUBRID,DERBY,FIREBIRD,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) @NotNull AlterTableFinalStep set(DataType<?> type)
This adds or removes NOT NULL
constraints on the column if
DataType.nullable()
is specified explicitly (not all databases
support this).
@NotNull @Support(value={DERBY,FIREBIRD,H2,HSQLDB,POSTGRES}) @NotNull AlterTableFinalStep setNotNull()
NOT NULL
.Copyright © 2021. All rights reserved.