Rename ASTNode to Expr

The ASTNode enum was confusingly named. In the past, the name made
sense, as the enum contained nearly all of the nodes in the AST, but
over time, pieces have been split into different structs, like
SQLStatement and SQLQuery. The ASTNode enum now contains only contains
expression nodes, so Expr is a better name.

Also rename the UnnamedExpression and ExpressionWithAlias variants
of SQLSelectItem to UnnamedExpr and ExprWithAlias, respectively, to
match the new shorthand for the word "expression".
This commit is contained in:
Nikhil Benesch 2019-06-04 13:56:37 -04:00
parent e6b26330df
commit 646d1e13ca
No known key found for this signature in database
GPG key ID: F7386C5DEADABA7F
8 changed files with 255 additions and 264 deletions

View file

@ -106,9 +106,7 @@ fn parse_create_table_with_defaults() {
options: vec![
ColumnOptionDef {
name: None,
option: ColumnOption::Default(ASTNode::SQLValue(Value::Boolean(
true
))),
option: ColumnOption::Default(Expr::SQLValue(Value::Boolean(true))),
},
ColumnOptionDef {
name: None,