1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! The `queryweave` runtime for the persistence layer: the traits and SQL the
//! code generated for entities and wrappers (`Columns`, `AppendToQuery`,
//! `AppendToQueryWithSeparator`) names, on top of the core runtime
//! (`queryweave`), which it re-exports so that code names only this crate.
//!
//! This is where the domain's database-agnostic filters, sorting and writes
//! (`queryweave::FilterCondition`, `queryweave::SortKey`,
//! `queryweave::FieldValue`) become SQL. They name domain fields; the
//! [`Columns`] of the entity storing them say which column each lives in, and
//! write the SQL against them.
//!
//! The SQL is portable across the databases sqlx supports: Postgres,
//! MySQL/MariaDB and SQLite (any [`BindValues`] database). What stays
//! database-specific is semantics, not syntax: `LIKE` is case-sensitive on
//! Postgres but case-insensitive on SQLite (for ASCII) and under MySQL's
//! default collations, and column names are written unquoted, so they must not
//! be reserved words of the database.
pub use *;
pub use BindValues;
pub use ;
pub use ;
/// The sqlx query builder the clauses are appended to, and the separated
/// builder `Columns::push_assignments` returns: re-exported so the generated
/// code (and its callers) name the same sqlx as this crate, whatever the user
/// calls their own sqlx dependency.
pub use ;
/// Not public API: what the code generated by `queryweave-derive`
/// calls.
///
/// The inherent methods `#[derive(Columns)]` emits run the column check
/// themselves (so a missing column is reported at *their* caller, the line
/// writing the data, rather than inside the derive) and then call the
/// unchecked writers here, so the check is not reported twice.
/// Append the filters query to the parent query.