data Rotor::Constraint(kind: Symbol, field: Symbol, name: String, message: String)

A constraint of the database a changeset expects to be violated by user input: on save, a violation of it (its SQLSTATE and name) is an error on field rather than an exception.

/home/runner/work/rotor/rotor/src/changeset.qz:35

Methods

def kind -> Symbol

/home/runner/work/rotor/rotor/src/changeset.qz:35

def field -> Symbol

/home/runner/work/rotor/rotor/src/changeset.qz:35

def name -> String

/home/runner/work/rotor/rotor/src/changeset.qz:35

def message -> String

/home/runner/work/rotor/rotor/src/changeset.qz:35

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

/home/runner/work/rotor/rotor/src/changeset.qz:37

def code -> String

The SQLSTATE a violation of this kind has.

/home/runner/work/rotor/rotor/src/changeset.qz:37

def with(*, kind: Symbol = …, field: Symbol = …, name: String = …, message: String = …) -> Rotor::Constraint

A copy with the fields given replaced.

/home/runner/work/rotor/rotor/src/changeset.qz:37