dysql-macro 0.8.11

Dysql is a rust crate that do dynamic-sql query through proc-macro, it bases on tokio-postgres (default feature) and sqlx crate
Documentation
mod fetch_all;
mod fetch_one;
mod fetch_scalar;
mod execute;
mod insert;
mod page;

use dysql::QueryType;

pub use fetch_all::*;
pub use fetch_one::*;
pub use fetch_scalar::*;
pub use execute::*;
pub use insert::*;
pub use page::*;

use crate::{SqlClosure, sql_expand::SqlExpand};

pub (crate) fn expand(st: &SqlClosure, query_type: QueryType) -> syn::Result<proc_macro2::TokenStream> {
    match query_type {
        QueryType::FetchAll => FetchAll.expand(st),
        QueryType::FetchOne => FetchOne.expand(st),
        QueryType::FetchScalar => FetchScalar.expand(st),
        QueryType::Execute => Execute.expand(st),
        QueryType::Insert => Insert.expand(st),
        QueryType::Page => Page.expand(st),
    }
}