stringqb/src/main.rs

21 lines
594 B
Rust
Raw Normal View History

2019-04-03 20:58:22 -04:00
//! This main file is just for temparary testing
2019-04-12 17:09:59 -04:00
use stringqb::prelude::*;
2019-04-03 20:58:22 -04:00
fn main() {
2019-04-12 17:09:59 -04:00
let mut qb = QueryBuilder::new(PostgresDriver::new());
2019-04-04 16:39:05 -04:00
qb.set("foo", Box::new("bar"))
.set("bar", Box::new(12))
.set("baz", Box::new(false))
.set("fizz", Box::new(12.38))
.set("buzz", Box::new((1, 2.0, true, 'q')));
// This just makes me sad
qb.r#where("foo <>", Box::new(2));
2019-04-04 16:39:05 -04:00
println!("QueryBuilder object: {:#?}", &qb);
2019-04-10 14:03:28 -04:00
// println!("SQLType mapping: {:#?}", SQLType::SmallInt(32));
// println!("Type: {:#?}", Type(Box::new(1234567890)));
2019-04-03 20:58:22 -04:00
}