Struct rustorm::writer::SqlFrag [] [src]

pub struct SqlFrag {
    pub sql: String,
    pub params: Vec<Value>,
    pub sql_options: Vec<SqlOption>,
}

sql fragment use this for writing SQL statements

Fields

sql
params
sql_options

Methods

impl SqlFrag

fn new(sql_options: Vec<SqlOption>) -> Self

fn append(&mut self, str: &str) -> &mut Self

fn appendln(&mut self, str: &str) -> &mut Self

fn tab(&mut self) -> &mut Self

fn tabs(&mut self, n: u32) -> &mut Self

fn ln(&mut self) -> &mut Self

fn ln_tab(&mut self) -> &mut Self

fn ln_tabs(&mut self, n: u32) -> &mut Self

fn comma(&mut self) -> &mut Self

fn sp(&mut self) -> &mut Self

fn spaces(&mut self, n: i32) -> &mut Self

fn left_river(&mut self, str: &str) -> &mut Self

write the string, aligning to the left side of the middle space (river)

fn right_river(&mut self, str: &str) -> &mut Self

write the string, aligning to the right side of the middle space (river), leaving the left with empty string

fn commasp(&mut self) -> &mut Self

fn comment(&mut self, comment: &str) -> &mut Self

fn parameter(&mut self, param: Value)

append parameter including the needed sql keywords

Trait Implementations

impl Display for SqlFrag

fn fmt(&self, f: &mut Formatter) -> Result