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