| Crates.io | into_query_derive |
| lib.rs | into_query_derive |
| version | 0.2.3 |
| created_at | 2020-12-03 13:49:29.296918+00 |
| updated_at | 2022-04-02 14:02:48.217133+00 |
| description | Provides a derive macro for IntoQuery |
| homepage | |
| repository | https://github.com/charliethomson/into_query/tree/master/into_query_derive |
| max_upload_size | |
| id | 319280 |
| size | 9,300 |
This crate is intended to be used only via the derive feature on into_query. This documentation is verbatim copied from into_query
#[derive(IntoQuery)]
#[table_name = "whateverlol"]
pub struct Filter {
foo: Option<String>,
bar: Option<Vec<i32>>,
baz: Option<Vec<u8>>,
}
mysql, postgres, sqlite: Set the backend to be used by the query builder
table_name: required
schema::<this>::dsl::<this>
schema_prefix: optional (default: crate)
<this>::schema::<table_name>::dsl
For example, if your project was structured as
src
│ main.rs
└───db
└───schema.rs
and your table was "cats"
#[derive(IntoQuery)]
#[table_name = "cats"]
#[schema_prefix = "crate::db"]
struct CatOptions {
..
}