Enum db_traits::errors::SchemaConstraintViolation [] [src]

pub enum SchemaConstraintViolation {
    ConflictingUpserts {
        conflicting_upserts: BTreeMap<TempId, BTreeSet<KnownEntid>>,
    },
    TypeDisagreements {
        conflicting_datoms: BTreeMap<(Entid, Entid, TypedValue), ValueType>,
    },
    CardinalityConflicts {
        conflicts: Vec<CardinalityConflict>,
    },
}

Variants

A transaction tried to assert datoms where one tempid upserts to two (or more) distinct entids.

Fields of ConflictingUpserts

A map from tempid to the entids it would upsert to.

In the future, we might even be able to attribute the upserts to particular (reduced) datoms, i.e., to particular [e a v] triples that caused the constraint violation. Attributing constraint violations to input data is more difficult to the multiple rewriting passes the input undergoes.

A transaction tried to assert a datom or datoms with the wrong value v type(s).

Fields of TypeDisagreements

The key ([e a v]) has an invalid value v: it is not of the expected value type.

A transaction tried to assert datoms that don't observe the schema's cardinality constraints.

Fields of CardinalityConflicts

Trait Implementations

impl Clone for SchemaConstraintViolation
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for SchemaConstraintViolation
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for SchemaConstraintViolation
[src]

impl PartialEq for SchemaConstraintViolation
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Display for SchemaConstraintViolation
[src]

[src]

Formats the value using the given formatter. Read more