mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Remove "SQL" prefix from types
The rationale here is the same as the last commit: since this crate exclusively parses SQL, there's no need to restate that in every type name. (The prefix seems to be an artifact of this crate's history as a submodule of Datafusion, where it was useful to explicitly call out which types were related to SQL parsing.) This commit has the additional benefit of making all type names consistent; over type we'd added some types which were not prefixed with "SQL".
This commit is contained in:
parent
cf655ad1a6
commit
ac555d7e86
17 changed files with 818 additions and 836 deletions
|
@ -30,10 +30,10 @@ fn main() {
|
|||
);
|
||||
|
||||
let dialect: Box<dyn Dialect> = match std::env::args().nth(2).unwrap_or_default().as_ref() {
|
||||
"--ansi" => Box::new(AnsiSqlDialect {}),
|
||||
"--ansi" => Box::new(AnsiDialect {}),
|
||||
"--postgres" => Box::new(PostgreSqlDialect {}),
|
||||
"--ms" => Box::new(MsSqlDialect {}),
|
||||
"--generic" | "" => Box::new(GenericSqlDialect {}),
|
||||
"--generic" | "" => Box::new(GenericDialect {}),
|
||||
s => panic!("Unexpected parameter: {}", s),
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#![warn(clippy::all)]
|
||||
|
||||
use sqlparser::dialect::GenericSqlDialect;
|
||||
use sqlparser::dialect::GenericDialect;
|
||||
use sqlparser::parser::*;
|
||||
|
||||
fn main() {
|
||||
|
@ -21,7 +21,7 @@ fn main() {
|
|||
WHERE a > b AND b < 100 \
|
||||
ORDER BY a DESC, b";
|
||||
|
||||
let dialect = GenericSqlDialect {};
|
||||
let dialect = GenericDialect {};
|
||||
|
||||
let ast = Parser::parse_sql(&dialect, sql.to_string()).unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue