Implement:
-
CREATE TABLE
-
READ COUNT
-
READ ALL
-
INSERT ONE
-
UPDATE ONE
-
DELETE ONE
-
Pure Rust: Written in pure Rust using zero unsafe code.
- rusqlite: Ergonomic bindings to SQLite for Rust (GitHub)
- syn: A parsing library for parsing a stream of Rust tokens into a syntax tree of Rust source code. (GitHub)
- quote: Provides the quote! macro for turning Rust syntax tree data structures into tokens of source code. (GitHub)
- proc-macro2: A wrapper around the procedural macro API of the compiler's proc_macro crate. (GitHub)
use rusqdrive::prelude::*;
#[tablename = "tablename"]
#[derive(Rusqdrive)]
#[rusqdrive(not_null = [true | false], unique = [true | false])]
#[tablename = "tablename"]
#[derive(Debug, Default, Rusqdrive)]
pub struct User {
pub id: Option<i32>,
#[rusqdrive(not_null = false, unique = false)]
pub name: Option<String>,
#[rusqdrive(not_null = false, unique = false)]
pub age: f64,
#[rusqdrive(not_null = false, unique = false)]
pub alive: bool,
}
make cargo-deny
make