Crates.io | sqlite3builder |
lib.rs | sqlite3builder |
version | 0.3.0 |
source | src |
created_at | 2020-02-10 06:52:34.612409 |
updated_at | 2020-02-18 05:00:18.649525 |
description | Simple SQL code generator for Sqlite3. |
homepage | |
repository | https://github.com/perdumonocle/sqlite3builder.git |
max_upload_size | |
id | 206931 |
size | 90,711 |
Simple SQL code generator. May be used with pooled Sqlite3 connection.
To use sqlite3builder
, first add this to your Cargo.toml
:
[dependencies]
sqlite3builder = "0.3"
Next, add this to your crate:
extern crate sql_builder;
use sql_builder::SqlBuilder;
Example:
let sql = SqlBuilder::select_from("company")
.field("id")
.field("name")
.and_where("salary > 25000")
.sql()?;
assert_eq!("SELECT id, name FROM company WHERE salary > 25000;", &sql);
This project is licensed under the MIT license.