macro_rules! temp {
(($Var:ident), $body:expr) => { ... };
(($Var:ident,), $body:expr) => { ... };
(($Var:ident, $($rest:ident),+ $(,)?), $body:expr) => { ... };
}Expand description
Introduces one or more temporary query variables for a nested constraint.
temp! is only meaningful inside macros that provide a local query context,
such as find!, exists!, or macros expanded from them like
pattern!. Each identifier becomes a fresh query
variable that is scoped to the wrapped body.
ⓘ
find!(
(person: Inline<_>),
temp!((friend), and!(
pattern!(&kb, [{ ?person @ social::friend: ?friend }]),
pattern!(&kb, [{ ?friend @ social::name: "Bob" }])
))
)