1mod case;
8mod condition;
9mod delete;
10mod insert;
11mod on_conflict;
12mod ordered;
13mod returning;
14mod select;
15mod traits;
16mod update;
17mod window;
18mod with;
19
20pub use case::*;
21pub use condition::*;
22pub use delete::*;
23pub use insert::*;
24pub use on_conflict::*;
25pub use ordered::*;
26pub use returning::*;
27pub use select::*;
28pub use traits::*;
29pub use update::*;
30pub use window::*;
31pub use with::*;
32
33#[derive(Debug, Clone)]
35pub struct Query;
36
37#[allow(clippy::large_enum_variant)]
39#[derive(Debug, Clone)]
40pub enum QueryStatement {
41 Select(SelectStatement),
42 Insert(InsertStatement),
43 Update(UpdateStatement),
44 Delete(DeleteStatement),
45}
46
47#[allow(clippy::large_enum_variant)]
49#[derive(Debug, Clone, PartialEq)]
50pub enum SubQueryStatement {
51 SelectStatement(SelectStatement),
52 InsertStatement(InsertStatement),
53 UpdateStatement(UpdateStatement),
54 DeleteStatement(DeleteStatement),
55 WithStatement(WithQuery),
56}
57
58impl Query {
59 pub fn select() -> SelectStatement {
61 SelectStatement::new()
62 }
63
64 pub fn insert() -> InsertStatement {
66 InsertStatement::new()
67 }
68
69 pub fn update() -> UpdateStatement {
71 UpdateStatement::new()
72 }
73
74 pub fn delete() -> DeleteStatement {
76 DeleteStatement::new()
77 }
78
79 pub fn with() -> WithClause {
81 WithClause::new()
82 }
83
84 pub fn returning() -> Returning {
86 Returning::new()
87 }
88}