not really tested: split proc macro and structs
parent
50110eb19f
commit
3dc28dca20
@ -0,0 +1,12 @@
|
|||||||
|
[package]
|
||||||
|
name = "joinrs"
|
||||||
|
version = "0.0.1"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
proc-macro2 = "1.0.78"
|
||||||
|
quote = "1.0.35"
|
||||||
|
syn = "2.0.51"
|
||||||
|
anyhow = "1.0.81"
|
||||||
|
thiserror = "1.0.58"
|
||||||
|
joinrs_proc = { path = "../joinrs_proc" }
|
@ -0,0 +1,16 @@
|
|||||||
|
pub use joinrs_proc::query_parsed;
|
||||||
|
pub use anyhow;
|
||||||
|
|
||||||
|
mod err {
|
||||||
|
use thiserror::Error;
|
||||||
|
|
||||||
|
#[derive(Error, Debug)]
|
||||||
|
pub enum QueryError {
|
||||||
|
#[error("Query returned no rows")]
|
||||||
|
RowNotFound,
|
||||||
|
#[error("Expected column {0} to have a value, but it was null")]
|
||||||
|
NullColumn(String),
|
||||||
|
#[error("Query returned too many rows, expected 1 but got {0}")]
|
||||||
|
TooManyRows(u32)
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "sqly"
|
name = "joinrs_proc"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
[toolchain]
|
|
||||||
channel = "nightly"
|
|
Loading…
Reference in New Issue