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#[derive(Debug, Clone)]
42pub enum QueryStatement {
43 Select(SelectStatement),
44 Insert(InsertStatement),
45 Update(UpdateStatement),
46 Delete(DeleteStatement),
47}
48
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}