pub struct Options {
pub input: PathBuf,
pub output: PathBuf,
pub crate_name: String,
pub rok_db: Dependency,
pub strict: bool,
pub database_url: Option<String>,
pub migration: Option<String>,
pub renames: Vec<Rename>,
pub allow_destructive: bool,
}Expand description
What to generate, and how.
Fields§
§input: PathBufDirectory holding the .sql files.
output: PathBufDirectory of the generated crate.
crate_name: StringPackage name of the generated crate.
rok_db: DependencyThe rok-db dependency of the generated crate.
strict: boolTreat warnings (queries that skip tenant or soft-delete filters) as errors.
database_url: Option<String>PostgreSQL server for checking queries that aren’t in queries.json.
migration: Option<String>Name for a new migration, when the schema changed.
renames: Vec<Rename>Renames to apply instead of drop-and-add.
allow_destructive: boolAllow steps that can lose data or fail on existing rows.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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