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
//! Mods for [`mysql::select`](crate::select()).
//!
//! Everything a MySQL `SELECT` can carry, and nothing else. There is no
//! `returning` — MySQL has none — no `fetch`, no `full_join`, no `distinct_on`, and
//! no `nulls_first`/`nulls_last` on a sort key.
//!
//! ```
//! use keelson_mysql as mysql;
//! use keelson_mysql::{Chain, arg, quote, select};
//!
//! let q = mysql::select((
//! select::columns((quote("id"), quote("name"))),
//! select::from(quote("users")),
//! select::where_(quote("age").gte(arg(21i32))),
//! select::order_by(quote("name")).desc(),
//! select::limit(10),
//! ));
//! ```
//!
//! # The two ways to say `STRAIGHT_JOIN`
//!
//! [`straight`] is the statement modifier — join every table in the order written.
//! [`straight_join`] is the join operator, applying to one pair. MySQL spells them
//! with the same keyword in two different productions, and they are not
//! interchangeable.
use ;
use crateSelectQuery;
pub use crate;
/// `LOCK IN SHARE MODE` — the pre-8.0 spelling of [`for_share`].
///
/// A production of its own rather than a lock strength: MySQL's grammar is
///
/// ```text
/// [FOR {UPDATE | SHARE} [OF tbl_name [, ...]] [NOWAIT | SKIP LOCKED]
/// | LOCK IN SHARE MODE]
/// ```
///
/// so this form takes neither an `OF` list nor a wait option, and it is an
/// *alternative* to the `FOR …` clause rather than an addition to it. Combining the
/// two is a caller error the server refuses.