Skip to main content

with

Function with 

Source
pub fn with(name: impl Into<Cow<'static, str>>, body: impl IntoExpr) -> CteChain
Expand description

WITH "name" AS (body).

body is any expression, so a hand-written fragment works, and a SelectQuery goes in directly because it implements IntoExpr. It is not parenthesised here — Cte supplies the parentheses.