use uqa_core::DocId;
use uqa_storage::document_store::Document;
#[derive(Debug, Clone, PartialEq)]
pub(in crate::sql) struct MutationCandidate<C = ()> {
pub identity: PhysicalDocumentIdentity,
pub document: Document,
pub context: C,
}
#[derive(Debug, Clone, PartialEq)]
pub(in crate::sql) struct MutationRewriteCandidate<C = ()> {
pub identity: PhysicalDocumentIdentity,
pub old_document: Document,
pub proposed_document: Document,
pub context: C,
}
pub(in crate::sql) enum MutationLockTarget {
Present { doc_id: DocId, recheck: bool },
Deleted,
}
pub(in crate::sql) enum PhysicalMutationLockTarget {
Present {
identity: PhysicalDocumentIdentity,
recheck: bool,
},
Deleted,
}
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub(in crate::sql) struct PhysicalDocumentIdentity {
pub table: String,
pub doc_id: DocId,
}