Struct query_builder::InsertQuery
[−]
[src]
pub struct InsertQuery<'a> { pub values: BTreeMap<&'a str, Value<'a>>, // some fields omitted }
Struct representing an SQL Insert Statement
Fields
values: BTreeMap<&'a str, Value<'a>>
Methods
impl<'a> InsertQuery<'a>
[src]
pub fn into(table: &'a str) -> InsertQuery<'a>
[src]
Creates a new InsertQuery
that inserts data in table specified by table
pub fn as_string(&self) -> String
[src]
Returns a String
that represents the InsertQuery
in a valid SQL statement
ⓘThis example is not tested
let mut q = InsertQuery::into("users"); q.values.insert("name", Value::Varchar("greg")); assert_eq!(q.as_string(), "INSERT INTO users(name) VALUES(greg)")
Trait Implementations
impl<'a> Debug for InsertQuery<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> Display for InsertQuery<'a>
[src]
fn fmt(&self, f: &mut Formatter) -> FormatResult
[src]
Formats the value using the given formatter. Read more