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
//! Compile time dynamic SQL generator.
//!
//! This is the compiler behind `#[py_sql]`, `#[html_sql]` and `#[sql]` (provided by
//! the `rbatis-macro-driver` crate and re-exported as
//! [`rbatis::rbatis_codegen`](https://docs.rs/rbatis/latest/rbatis/)). A dynamic SQL
//! template is parsed here and turned into plain Rust source code, which is then
//! compiled by the `rustc` invocation that is already running. That is why a query
//! written in `py_sql`/`html_sql` runs as fast as hand written SQL: nothing is
//! interpreted at runtime.
//!
//! * [`codegen::func`] holds the code generation functions
//! * [`codegen::parser_pysql`] and [`codegen::parser_html`] parse the two languages
//! * [`codegen::syntax_tree_pysql`] and [`codegen::syntax_tree_html`] are the
//! abstract syntax trees they produce
//! * [`ops`] contains the operators that are available inside a template
//! (`+`, `==`, `.sql()`, `.csv()`, ...)
//! * [`IntoSql`] renders a value as SQL, used by `${arg}` interpolation
//!
//! Most users never depend on this crate directly; it is documented because it is
//! re-exported from rbatis.
/// rendering a value as SQL, used by `${arg}` interpolation
pub use IntoSql;
/// parsers and code generators of the `py_sql` and `html_sql` languages
/// error type of the code generator
/// `bool` helpers available inside a template expression
/// operators (`+`, `==`, `.sql()`, ...) usable inside a template
/// `+` operator
/// `&` (bit and) operator
/// `|` (bit or) operator
/// comparison operators (`>`, `<`, `>=`, `<=`)
/// `/` operator
/// `==` operator
/// `*` operator
/// unary `-` operator
/// `!` operator
/// `%` operator
/// `<<` operator
/// `>>` operator
/// string helpers (`.sql()`, `.csv()`, ...)
/// `-` operator
/// `^` operator
pub use ;