[−][src]Struct sql_db_mapper::Opt
The program options for the code generation
Fields
debug: bool
Activate debug mode
ugly: bool
Skip running output through rustfmt
dir: bool
Program will treat output as a directory name rather than a file and generate a whole crate. If output is not provided code is printed as usual
rust_case: bool
Convert names from the database to rust standard (i.e. table names in CamelCase, fields and functions in snake_case)
rustfmt_config: Option<String>
string passed to rustfmt --config
rustfmt_config_path: Option<String>
string passed to rustfmt --config-path
no_functions: bool
Only make mappings for tables and views
use_tuples: Tuples
How to use tuples (used by default for just overloads). Options: overloads (the default, use tuples to represent function overloading). all (Have all functions take a tuple for consitency). none (skip mapping overloaded procs at all). one_overload (avoid tuples by only mapping the oldest sql proc in the database).
third_party: Vec<ThirdParty>
A comma seperated list of third party crates which contain types that will be mapped to and from sql types. Valid values are "bit_vec,chrono,eui48,geo_types,rust_decimal,serde_json,time,uuid"
conn: String
String to connect to database, see tokio_postgres::Config for details. If not provided environment variable DATABASE_URL is checked instead
output: Option<PathBuf>
Output file, stdout if not present
Implementations
impl Opt
[src]
pub fn get_cargo_toml(&self) -> String
[src]
Produce the Cargo.toml file contents (the dependecies of the generated code)
pub fn get_call_string(&self) -> String
[src]
Build a call string that could be used to get the same options
pub fn get_client(&self) -> MyClient
[src]
Trait Implementations
impl Debug for Opt
[src]
impl StructOpt for Opt
[src]
fn clap<'a, 'b>() -> App<'a, 'b>
[src]
fn from_clap(matches: &ArgMatches<'_>) -> Self
[src]
pub fn from_args() -> Self
[src]
pub fn from_args_safe() -> Result<Self, Error>
[src]
pub fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
pub fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for Opt
[src]
fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>
[src]
fn is_subcommand() -> bool
[src]
pub fn from_subcommand(
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
[src]
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
Auto Trait Implementations
impl RefUnwindSafe for Opt
[src]
impl Send for Opt
[src]
impl Sync for Opt
[src]
impl Unpin for Opt
[src]
impl UnwindSafe for Opt
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,