Table
Properties
Returns the first auto-increment column on the table.
Returns the field of this field set.
Returns all foreign key constraints declared on the table.
Returns the primary key of the table if present, null
otherwise.
Returns all real fields, unrolling composite CompositeColumn if present
Returns the schema name, or null if one does not exist for this table.
Functions
Creates an array column, with the specified name, for storing elements of a List
.
Creates an array column, with the specified name, for storing elements of a List
using a base columnType.
Creates a multi-dimensional array column, with the specified name, for storing elements of a nested List
. The number of dimensions is specified by the dimensions parameter.
Creates a multi-dimensional array column, with the specified name, for storing elements of a nested List
. The number of dimensions is specified by the dimensions parameter.
UUID column will auto generate its value on a client side just before an insert.
Make @receiver column an auto-increment column to generate its values in a database. Note: Only integer and long columns are supported (signed and unsigned types). Some databases, like PostgreSQL, support auto-increment via sequences. In this case a name should be provided using the idSeqName param and Exposed will create a sequence. If a sequence already exists in the database just use its name in idSeqName.
Make @receiver column an auto-increment column to generate its values in a database. Note: Only integer and long columns are supported (signed and unsigned types). Some databases, like PostgreSQL, support auto-increment via sequences. In this case, a sequence should be provided using the sequence param.
Creates a binary column, with the specified name, for storing BLOBs. If useObjectIdentifier is true
, then the column will use the OID
type on PostgreSQL for storing large binary objects. The parameter must not be true
for other databases.
Creates a character column, with the specified name, for storing single characters.
Returns the list of DDL statements that create this object.
Creates a cross join relation with otherTable.
Marks a column as databaseGenerated
if the default value of the column is not known at the time of table creation and/or if it depends on other columns. It makes it possible to omit setting it when inserting a new record, without getting an error. The value for the column can be set by creating a TRIGGER or with a DEFAULT clause or by using GENERATED ALWAYS AS via Column.withDefinition, for example.
Sets the default value for this column in the database side.
Appends the SQL representation of this column set to the specified queryBuilder.
Returns the list of DDL statements that drops this object.
Creates a composite foreign key.
Creates a full outer join relation with otherTable.
Creates an index.
Creates an index composed by this column only.
Creates an inner join relation with otherTable.
Creates a join relation with otherTable. When all joining options are absent Exposed will try to resolve referencing columns by itself.
Creates a join relation between this table and a query.
Creates a left outer join relation with otherTable.
Returns the list of DDL statements that modify this object.
Returns the table name in proper case. Should be called within transaction or default tableName will be returned.
Returns the table name, without schema and in proper case, with wrapping single- and double-quotation characters removed.
Applies a special transformation that allows a non-nullable database column to accept and/or return values as null
on the client side.
Creates a column with the specified name with an optional reference to the id
column in foreign table with onDelete, onUpdate, and fkName options. onDelete and onUpdate options describe the behavior for how links between tables will be checked when deleting or changing corresponding columns' values. Such a relationship will be represented as a FOREIGN KEY constraint on table creation.
Creates a column with the specified name with an optional reference to the refColumn column with onDelete, onUpdate, and fkName options. onDelete and onUpdate options describe the behavior for how links between tables will be checked when deleting or changing corresponding columns' values. Such a relationship will be represented as a FOREIGN KEY constraint on table creation.
Creates a column with the specified name with a reference to the id
column in foreign table and with onDelete, onUpdate, and fkName options. onDelete and onUpdate options describe the behavior for how links between tables will be checked when deleting or changing corresponding columns' values. Such a relationship will be represented as a FOREIGN KEY constraint on table creation.
Creates a column with the specified name with a reference to the refColumn column and with onDelete, onUpdate, and fkName options. onDelete and onUpdate options describe the behavior for how links between tables will be checked when deleting or changing corresponding columns' values. Such a relationship will be represented as a FOREIGN KEY constraint on table creation.
Creates a reference from this @receiver column to a ref column.
Creates a reference from this @receiver column to a ref column with onDelete, onUpdate, and fkName options. onDelete and onUpdate options describe the behavior for how links between tables will be checked when deleting or changing corresponding columns' values. Such a relationship will be represented as a FOREIGN KEY constraint on table creation.
Adds all wrapped column components of a CompositeColumn to the table.
Creates a right outer join relation with otherTable.
Returns the list of tables to which the columns in this column set belong.
Transforms a nullable column by specifying a transformer.
Transforms a column by specifying a transformer.
Transforms a nullable column by specifying transformation functions.
Transforms a column by specifying transformation functions.
Creates a unique index composed by this column only.
Creates a unique index.
Appends a database-specific column definition to this column's SQL in a CREATE TABLE statement.