autoIncrement

fun <N : Any> Column<N>.autoIncrement(idSeqName: String? = null): Column<N>

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.

Parameters

idSeqName

an optional parameter to provide a sequence name


fun <N : Any> Column<N>.autoIncrement(sequence: Sequence): Column<N>

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.

Parameters

sequence

a parameter to provide a sequence