-
Notifications
You must be signed in to change notification settings - Fork 602
Make Parser & Tokenizer generic over Dialect, remove test_utils
module
#407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,14 +21,12 @@ | |
//! use sqlparser::dialect::GenericDialect; | ||
//! use sqlparser::parser::Parser; | ||
//! | ||
//! let dialect = GenericDialect {}; // or AnsiDialect | ||
//! | ||
//! let sql = "SELECT a, b, 123, myfunc(b) \ | ||
//! FROM table_1 \ | ||
//! WHERE a > b AND b < 100 \ | ||
//! ORDER BY a DESC, b"; | ||
//! | ||
//! let ast = Parser::parse_sql(&dialect, sql).unwrap(); | ||
//! let ast = Parser::<GenericDialect>::parse_sql(sql).unwrap(); | ||
//! | ||
//! println!("AST: {:?}", ast); | ||
//! ``` | ||
|
@@ -45,9 +43,3 @@ pub mod dialect; | |
pub mod keywords; | ||
pub mod parser; | ||
pub mod tokenizer; | ||
|
||
#[doc(hidden)] | ||
// This is required to make utilities accessible by both the crate-internal | ||
// unit-tests and by the integration tests <https://stackoverflow.com/a/44541071/1026> | ||
// External users are not supposed to rely on this module. | ||
pub mod test_utils; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a reasonable change, though it may cause other users of this crate upgrade pain 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to improve the documentation in a followup PR. This PR is already big enough IMO.