mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-02 20:27:21 +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
|
@ -15,7 +15,7 @@
|
|||
//! generic dialect is also tested (on the inputs it can handle).
|
||||
|
||||
use sqlparser::ast::*;
|
||||
use sqlparser::dialect::{GenericSqlDialect, MsSqlDialect};
|
||||
use sqlparser::dialect::{GenericDialect, MsSqlDialect};
|
||||
use sqlparser::test_utils::*;
|
||||
|
||||
#[test]
|
||||
|
@ -23,11 +23,11 @@ fn parse_mssql_identifiers() {
|
|||
let sql = "SELECT @@version, _foo$123 FROM ##temp";
|
||||
let select = ms_and_generic().verified_only_select(sql);
|
||||
assert_eq!(
|
||||
&Expr::SQLIdentifier("@@version".to_string()),
|
||||
&Expr::Identifier("@@version".to_string()),
|
||||
expr_from_projection(&select.projection[0]),
|
||||
);
|
||||
assert_eq!(
|
||||
&Expr::SQLIdentifier("_foo$123".to_string()),
|
||||
&Expr::Identifier("_foo$123".to_string()),
|
||||
expr_from_projection(&select.projection[1]),
|
||||
);
|
||||
assert_eq!(2, select.projection.len());
|
||||
|
@ -75,6 +75,6 @@ fn ms() -> TestedDialects {
|
|||
}
|
||||
fn ms_and_generic() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(MsSqlDialect {}), Box::new(GenericSqlDialect {})],
|
||||
dialects: vec![Box::new(MsSqlDialect {}), Box::new(GenericDialect {})],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue