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