pub struct Generate;Expand description
The public generation facade: loads a model, compiles it, and — under
RunMode::Generate — runs the engine and renders SQL. Build a request
with Generate::builder.
Implementations§
Source§impl Generate
impl Generate
Sourcepub fn builder() -> GenerateBuilder
pub fn builder() -> GenerateBuilder
A fresh GenerateBuilder with default options (RunMode::Generate,
RenderOptions::default, no seed/scale/table overrides).
Sourcepub fn run(request: GenerateRequest) -> Result<GenerateReport, GenerateError>
pub fn run(request: GenerateRequest) -> Result<GenerateReport, GenerateError>
Run one fully-specified request end to end.
Resolves the model — profiling and inferring a base from request.input
when given, then merging a kind: overrides request.config on top —
compiles it exactly once, optionally serializes the resolved model
(request.emit) from that same plan, and optionally executes the same
plan under request.mode.
Structured problems discovered during loading, compilation, or runtime
come back as GenerateError::Diagnostics or
GenerateError::Diagnostic.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Generate
impl RefUnwindSafe for Generate
impl Send for Generate
impl Sync for Generate
impl Unpin for Generate
impl UnsafeUnpin for Generate
impl UnwindSafe for Generate
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more