-
public interface AlterTableAlterStep<T>
The step in theALTER TABLE
DSL used toALTER
columns.Referencing
XYZ*Step
types directly from client codeIt 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:- They're operating on mutable implementations (as of jOOQ 3.x)
- They're less composable and not easy to get right when dynamic SQL gets complex
- They're less readable
- They might have binary incompatible changes between minor releases
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AlterTableFinalStep
default_(Field<T> expression)
Specify a new columnDEFAULT
.AlterTableFinalStep
default_(T literal)
Specify a new columnDEFAULT
.AlterTableFinalStep
defaultValue(Field<T> expression)
Specify a new columnDEFAULT
.AlterTableFinalStep
defaultValue(T literal)
Specify a new columnDEFAULT
.AlterTableFinalStep
dropDefault()
Drop the columnDEFAULT
.AlterTableFinalStep
dropNotNull()
Make the column nullable.AlterTableFinalStep
set(DataType<?> type)
Specify a new column data type.AlterTableFinalStep
setDefault(Field<T> expression)
Specify a new columnDEFAULT
.AlterTableFinalStep
setDefault(T literal)
Specify a new columnDEFAULT
.AlterTableFinalStep
setNotNull()
Make the columnNOT NULL
.
-
-
-
Method Detail
-
defaultValue
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep defaultValue(T literal)
Specify a new columnDEFAULT
.This is an alias for
default_(Object)
.
-
defaultValue
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep defaultValue(Field<T> expression)
Specify a new columnDEFAULT
.This is an alias for
default_(Field)
.
-
default_
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep default_(T literal)
Specify a new columnDEFAULT
.
-
default_
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep default_(Field<T> expression)
Specify a new columnDEFAULT
.
-
setDefault
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep setDefault(T literal)
Specify a new columnDEFAULT
.
-
setDefault
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep setDefault(Field<T> expression)
Specify a new columnDEFAULT
.
-
dropDefault
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLSERVER,SYBASE,VERTICA}) AlterTableFinalStep dropDefault()
Drop the columnDEFAULT
.
-
set
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) AlterTableFinalStep set(DataType<?> type)
Specify a new column data type.This adds or removes
NOT NULL
constraints on the column ifDataType.nullable()
is specified explicitly (not all databases support this).
-
setNotNull
@Support({ASE,AURORA_POSTGRES,COCKROACHDB,DB2,DERBY,FIREBIRD_3_0,H2,HSQLDB,POSTGRES,VERTICA}) AlterTableFinalStep setNotNull()
Make the columnNOT NULL
.
-
dropNotNull
@Support({ASE,AURORA_POSTGRES,COCKROACHDB,DB2,DERBY,FIREBIRD_3_0,H2,HSQLDB,POSTGRES,VERTICA}) AlterTableFinalStep dropNotNull()
Make the column nullable.
-
-