diff --git a/db/src/internal_types.rs b/db/src/internal_types.rs index 782ff22d..ff417c7c 100644 --- a/db/src/internal_types.rs +++ b/db/src/internal_types.rs @@ -181,6 +181,14 @@ impl TermWithTempIds { } } +impl TermWithoutTempIds { + pub(crate) fn rewrap(self) -> Term, TypedValueOr> { + match self { + Term::AddOrRetract(op, n, a, v) => Term::AddOrRetract(op, Left(n), a, Left(v)) + } + } +} + /// Given a `KnownEntidOr` or a `TypedValueOr`, replace any internal `LookupRef` with the entid from /// the given map. Fail if any `LookupRef` cannot be replaced. ///