sqlite3builder

Crates.iosqlite3builder
lib.rssqlite3builder
version0.3.0
sourcesrc
created_at2020-02-10 06:52:34.612409
updated_at2020-02-18 05:00:18.649525
descriptionSimple SQL code generator for Sqlite3.
homepage
repositoryhttps://github.com/perdumonocle/sqlite3builder.git
max_upload_size
id206931
size90,711
(perdumonocle)

documentation

README

sqlite3builder

Build Status Latest Version Docs

Simple SQL code generator. May be used with pooled Sqlite3 connection.

Usage

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);

SQL support

Statements

  • SELECT
  • INSERT
  • UPDATE
  • DELETE

Operations

  • join
  • distinct
  • group by
  • order by
  • where
  • limit, offset
  • subquery
  • get all results
  • get first row
  • get first value, first integer value, first string value

Functions

  • escape
  • query

License

This project is licensed under the MIT license.

Commit count: 13

cargo fmt