ADSQLColumnConstraint

public struct ADSQLColumnConstraint

Holds information about a constraint applied to a Column Definition that has been parsed from a SQL CREATE TABLE instruction.

  • The type of the constraint.

    Declaration

    Swift

    public var type: ColumnConstraintType = .primaryKeyAsc
  • If the column is a PRIMARY KEY of the INTEGER type, is it automatically incremented when a new row is created in the table.

    Declaration

    Swift

    public var autoIncrement: Bool = false
  • Defines how conflicts should be handled for this column.

    Declaration

    Swift

    public var conflictHandling: ADSQLConflictHandling = .none
  • Holds the expression for a Check or Default Value constraint.

    Declaration

    Swift

    public var expression: ADSQLExpression?
  • Initializes a new instance of the Column Constraint.

    Declaration

    Swift

    public init()
  • Initializes a new instance of the Column Constraint.

    Declaration

    Swift

    public init(ofType type: ColumnConstraintType, withExpression expression: ADSQLExpression? = nil)

    Parameters

    type

    The type of constraint being created.

    expression

    An expression for a Check or Default Value constraint.