//! Apply a table's set invariants to a record before it is written.
//!
//! A `Table` narrowed by a literal `column = value` (an id scope or a traversed
//! relation) carries that pair as an *invariant* (see `Table::invariants`).
//! Full-record writes conform (fill absent/null columns, reject a different
//! value); patches validate (never fill, reject a null or different value).
//! Both the typed-entity and the raw-record write paths funnel through here.
use IndexMap;
use Result;
use ;
/// Conform `record` to `invariants`: fill absent/null columns, keep equal
/// values, `Conflict` on a different one.
pub
/// Check a patch against `invariants` without adding anything.
pub