pub struct GenerateRequest {
pub input: Option<PathBuf>,
pub config: Option<PathBuf>,
pub output: OutputTarget,
pub emit: Option<OutputTarget>,
pub compile: CompileOptions,
pub render: RenderOptions,
pub output_dialect: Option<SqlDialect>,
pub mode: RunMode,
pub explain: bool,
pub verify: bool,
pub strict: bool,
pub source: SourceOptions,
}Expand description
One fully-specified generation request: everything Generate::run
needs, assembled by a GenerateBuilder (or constructed directly by a
caller that wants to bypass the builder).
Fields§
§input: Option<PathBuf>A source dump to profile into a base model.
config: Option<PathBuf>A kind: model or kind: overrides YAML document.
output: OutputTargetWhere rendered SQL is written.
emit: Option<OutputTarget>Where the resolved, self-contained model is serialized (--emit-config),
or None to emit nothing.
compile: CompileOptionsRow-count and table-selection controls passed to ModelCompiler.
render: RenderOptionsDialect and formatting controls passed to crate::render::SqlRenderer.
output_dialect: Option<SqlDialect>The explicitly requested output dialect (--dialect /
GenerateBuilder::output_dialect), or None to resolve the dialect
from the model. Precedence (see resolve_render_options): this explicit
value > the model’s output.dialect > the model’s captured source/input
dialect (preserve-source) > SqlDialect::MySql. When the dialect is
chosen deliberately (here or via the model’s output block) and differs
from the model’s source, the renderer maps every type across dialects and
reports lossy conversions; a preserve-source run renders the schema
verbatim so a model’s optional source: block stays removable metadata.
mode: RunModeWhether to fully generate, only validate, only report the plan, or only emit the resolved model.
explain: boolWhether to build the --explain inference report.
verify: boolWhether to verify the generated SQL against the compiled plan and publish
atomically only if the audit passes (--verify). Requires a filesystem
SQL destination under RunMode::Generate.
strict: boolTreat warnings as fatal and publish no SQL or emitted model when any compile-, render-, or verification-stage warning is produced.
source: SourceOptionsHow to profile input, if given.
Trait Implementations§
Source§impl Clone for GenerateRequest
impl Clone for GenerateRequest
Source§fn clone(&self) -> GenerateRequest
fn clone(&self) -> GenerateRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for GenerateRequest
impl RefUnwindSafe for GenerateRequest
impl Send for GenerateRequest
impl Sync for GenerateRequest
impl Unpin for GenerateRequest
impl UnsafeUnpin for GenerateRequest
impl UnwindSafe for GenerateRequest
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