Skip to main content

uqa_execution/mutation/
deferred.rs

1//
2// Unified Query Algebra
3//
4// Copyright (c) 2023-2026 Cognica, Inc.
5//
6
7//! Typed deferred constraint work registered by the mutation protocol.
8
9#[derive(Debug, Clone, PartialEq, Eq)]
10pub struct DeferredForeignKeyCheck {
11    /// The constraint whose deferral governs the check and whose name its violation reports: the foreign key, or the constraint it derives on the referenced partition whose change fired the check.
12    pub constraint: uqa_sql::catalog::constraints::ConstraintIdentity,
13    pub firing_relation: uqa_core::RelationIdentity,
14    pub row: Option<crate::row_locks::RowLockKey>,
15    /// The original referenced key that fired this check. Child-row checks and
16    /// relation-only constraint events have no retained parent key.
17    pub referenced_values: Option<std::sync::Arc<[uqa_core::Value]>>,
18}