Instance Property
autoIncrementFunction
An expression inserted in a column definition when a
SQLColumnConstraintAlgorithm.primaryKey(autoIncrement:) or SQLTableConstraintAlgorithm.primaryKey(columns:) constraint is specified for the column.var autoIncrementFunction: (any SQLExpression)? { get }
Discussion
The expression will be immediately preceded by the literalDefault expression and appear immediately before PRIMARY KEY in the resulting SQL.
This property is ignored when supportsAutoIncrement is false. If this property is not nil, it takes precedence over autoIncrementClause.
Defaults to nil.
Note
The design of this and the other autoincrement-released properties is less than ideal, but it’s public API and we’re stuck with it for now.
Default Implementations
SQLDialect Implementations
autoIncrementFunctionDefault implementation ofautoIncrementFunction.
See Also
Syntax Indicators
enumSyntaxThe syntax the dialect supports for strongly-typed enumerations.triggerSyntaxVarious flags describing the dialect’s support for specific features ofSQLCreateTriggerandSQLDropTriggerqueries.alterTableSyntaxA description of the syntax the dialect supports forSQLAlterTablequeries.autoIncrementClauseAn expression inserted in a column definition when a.primaryKey(autoincrement: true)constraint is specified for the column.upsertSyntaxThe type ofUPSERTsyntax supported by the dialect.sharedSelectLockExpressionA serialization forSQLLockingClause.share.exclusiveSelectLockExpressionA serialization forSQLLockingClause.update.