-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f16b3bc
commit d0eb0f0
Showing
8 changed files
with
286 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod select_from; | ||
pub mod select_limit; | ||
pub mod select_order; | ||
pub mod select_projection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#[cfg(test)] | ||
use crate::lang::tests::helpers::compare_parsed_to_expected; | ||
|
||
#[cfg(test)] | ||
use serde_json::json; | ||
|
||
#[cfg(test)] | ||
use crate::assert_parsing; | ||
|
||
#[cfg(test)] | ||
assert_parsing! { | ||
plain: { | ||
"SELECT * from users;" => { | ||
"type": "Stmt::Program", | ||
"body": [ | ||
{ | ||
"type": "Stmt::Expression", | ||
"expr": { | ||
"type": "Expr::Select", | ||
"value": { | ||
"core": { | ||
"from": { | ||
"type": "Group", | ||
"subqueries": [{ | ||
"type": "Collection", | ||
"alias": null, | ||
"name": "users", | ||
"namespace": null, | ||
}], | ||
}, | ||
"projection": [{ | ||
"type": "All", | ||
"collection": null | ||
}] | ||
}, | ||
"compound": [], | ||
"limit": null, | ||
"order_by": null | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.