Trait bison_orm::builder::BuilderExt [−][src]
An extension trait for query builders that provides a variety of convenient functions.
Required methods
fn quote(&self, ident: impl Into<String>) -> String
[src]
Quotes the given identifier with the characters based on the configured dialect. It defaults to "`".
fn schema(&mut self, schema: impl AsRef<str>) -> &mut Self
[src]
fn ident(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
Appends the given string as an identifier.
fn ident_comma<I, S>(&mut self, s: I) -> &mut Self where
I: IntoIterator<Item = S>,
S: AsRef<str>,
[src]
I: IntoIterator<Item = S>,
S: AsRef<str>,
Calls ident
on all arguments and adds a comma between them.
fn op(&mut self, op: Op) -> &mut Self
[src]
Push an operator to the builder.
fn arg(&mut self, arg: impl ToString) -> &mut Self
[src]
Append an input argument to the builder.
fn join(&mut self, builder: impl Builder) -> &mut Self
[src]
Join this builder with an existing builder.
fn join_many<I, B>(&mut self, builders: I) -> &mut Self where
I: IntoIterator<Item = B>,
B: Builder,
[src]
I: IntoIterator<Item = B>,
B: Builder,
Join this builder with a list of comma seperated builders.
fn nested(&mut self, f: impl FnOnce(&mut BaseBuilder)) -> &mut Self
[src]
Accepts a callback, and wraps its result with parentheses.
fn push_str(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
Push a raw string to the builder.
fn push(&mut self, c: char) -> &mut Self
[src]
Push a raw char to the builder.
fn prefix(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
Prefix the builder query with a raw string.
fn comma(&mut self) -> &mut Self
[src]
Add a comma to the query.
fn pad(&mut self) -> &mut Self
[src]
Add a space to the query.
fn is_ident(&self, s: impl AsRef<str>) -> bool
[src]
Whether the given string is a dialect identifier.
fn dialect(&self) -> &Dialect
[src]
Returns the dialect of the builder.
fn set_dialect(&mut self, dialect: Dialect) -> &mut Self
[src]
Sets the builder dialect. It's used for garnering dialect specific queries.
fn total(&self) -> usize
[src]
Returns the total number of arguments so far.
fn set_total(&mut self, total: usize) -> &mut Self
[src]
Sets the value of the total arguments. Used to pass this information between sub builders/expressions.
Implementors
impl BuilderExt for BaseBuilder
[src]
fn quote(&self, ident: impl Into<String>) -> String
[src]
fn schema(&mut self, schema: impl AsRef<str>) -> &mut Self
[src]
fn ident(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
fn ident_comma<I, S>(&mut self, s: I) -> &mut Self where
I: IntoIterator<Item = S>,
S: AsRef<str>,
[src]
I: IntoIterator<Item = S>,
S: AsRef<str>,
fn op(&mut self, op: Op) -> &mut Self
[src]
fn arg(&mut self, arg: impl ToString) -> &mut Self
[src]
fn join(&mut self, builder: impl Builder) -> &mut Self
[src]
fn join_many<I, B>(&mut self, builders: I) -> &mut Self where
I: IntoIterator<Item = B>,
B: Builder,
[src]
I: IntoIterator<Item = B>,
B: Builder,
fn nested(&mut self, f: impl FnOnce(&mut Self)) -> &mut Self
[src]
fn push_str(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
fn push(&mut self, c: char) -> &mut Self
[src]
fn prefix(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
fn comma(&mut self) -> &mut Self
[src]
fn pad(&mut self) -> &mut Self
[src]
fn is_ident(&self, s: impl AsRef<str>) -> bool
[src]
fn dialect(&self) -> &Dialect
[src]
fn set_dialect(&mut self, dialect: Dialect) -> &mut Self
[src]
fn total(&self) -> usize
[src]
fn set_total(&mut self, total: usize) -> &mut Self
[src]
impl<T> BuilderExt for T where
T: ChildBuilder,
[src]
T: ChildBuilder,
fn quote(&self, ident: impl Into<String>) -> String
[src]
fn schema(&mut self, schema: impl AsRef<str>) -> &mut Self
[src]
fn ident(&mut self, s: impl AsRef<str>) -> &mut Self
[src]
fn ident_comma<I, S>(&mut self, s: I) -> &mut Self where
I: IntoIterator<Item = S>,
S: AsRef<str>,
[src]
I: IntoIterator<Item = S>,
S: AsRef<str>,
fn op(&mut self, op: Op) -> &mut Self
[src]
fn arg(&mut self, arg: impl ToString) -> &mut Self
[src]
fn join(&mut self, builder: impl Builder) -> &mut Self
[src]
fn join_many<I, B>(&mut self, builders: I) -> &mut Self where
I: IntoIterator<Item = B>,
B: Builder,
[src]
I: IntoIterator<Item = B>,
B: Builder,