Type Parameters
- TExpr extends TCorePropositionalExpression = TCorePropositionalExpression
- TVar extends
| {
argumentId: string;
argumentVersion: number;
checksum: string;
claimId: string;
claimVersion: number;
id: string;
symbol: string;
}
| {
argumentId: string;
argumentVersion: number;
boundArgumentId: string;
boundArgumentVersion: number;
boundPremiseId: string;
checksum: string;
id: string;
symbol: string;
} =
| {
argumentId: string;
argumentVersion: number;
checksum: string;
claimId: string;
claimVersion: number;
id: string;
symbol: string;
}
| {
argumentId: string;
argumentVersion: number;
boundArgumentId: string;
boundArgumentVersion: number;
boundPremiseId: string;
checksum: string;
id: string;
symbol: string;
} - TPremise extends
| {
argumentId: string;
argumentVersion: number;
checksum: string;
combinedChecksum: string;
descendantChecksum: string
| null;
id: string;
type: "freeform";
}
| {
argumentId: string;
argumentVersion: number;
checksum: string;
combinedChecksum: string;
derivedClaimId: string;
descendantChecksum: string
| null;
id: string;
type: "derivation";
} =
| {
argumentId: string;
argumentVersion: number;
checksum: string;
combinedChecksum: string;
descendantChecksum: string
| null;
id: string;
type: "freeform";
}
| {
argumentId: string;
argumentVersion: number;
checksum: string;
combinedChecksum: string;
derivedClaimId: string;
descendantChecksum: string
| null;
id: string;
type: "derivation";
} - TArg extends {
checksum: string;
combinedChecksum: string;
descendantChecksum: string | null;
id: string;
version: number;
} = {
checksum: string;
combinedChecksum: string;
descendantChecksum: string | null;
id: string;
version: number;
}
A flat array of TOrderedOperation entries in FK-safe
execution order. Returns an empty array if the changeset is empty.
Converts a changeset into a flat, ordered array of persistence operations that is safe to execute sequentially against a relational store with foreign-key constraints.
The FK dependency chain is:
expression.premiseId→premise.idexpression.variableId→variable.id(for variable-type expressions)expression.parentId→expression.id(self-FK for tree structure)variable.argumentId→argument.idpremise.argumentId→argument.idThe resulting order guarantees that every referenced row exists before any row that depends on it is inserted, and that every dependent row is removed before the row it references is deleted.
Ordering phases: