uqa_execution/mutation/
candidate.rs1use uqa_core::DocId;
10use uqa_storage::document_store::Document;
11
12#[derive(Debug, Clone, PartialEq)]
13pub struct MutationCandidate<C = ()> {
14 pub identity: PhysicalDocumentIdentity,
15 pub document: Document,
16 pub context: C,
17}
18
19#[derive(Debug, Clone, PartialEq)]
20pub struct MutationRewriteCandidate<C = ()> {
21 pub identity: PhysicalDocumentIdentity,
22 pub old_document: Document,
23 pub proposed_document: Document,
24 pub context: C,
25}
26
27pub enum MutationLockTarget {
29 Present { doc_id: DocId, recheck: bool },
30 Deleted,
31}
32
33pub enum PhysicalMutationLockTarget {
35 Present {
36 identity: PhysicalDocumentIdentity,
37 recheck: bool,
38 },
39 Deleted,
40}
41
42#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
43pub struct PhysicalDocumentIdentity {
44 pub table: String,
45 pub doc_id: DocId,
46}