Remove unused ASTNode::SQLAssignment variant (3/5)

The SQLAssignment *struct* is used directly in ASTNode::SQLUpdate (will
change to SQLStatement::SQLUpdate shortly).
This commit is contained in:
Nickolay Ponomarev 2019-01-29 15:00:50 +03:00
parent 45a5f844af
commit 7b86f5c842

View file

@ -39,8 +39,6 @@ pub enum ASTNode {
SQLWildcard,
/// Multi part identifier e.g. `myschema.dbo.mytable`
SQLCompoundIdentifier(Vec<SQLIdent>),
/// Assigment e.g. `name = 'Fred'` in an UPDATE statement
SQLAssignment(SQLAssignment),
/// `IS NULL` expression
SQLIsNull(Box<ASTNode>),
/// `IS NOT NULL` expression
@ -135,7 +133,6 @@ impl ToString for ASTNode {
ASTNode::SQLIdentifier(s) => s.to_string(),
ASTNode::SQLWildcard => "*".to_string(),
ASTNode::SQLCompoundIdentifier(s) => s.join("."),
ASTNode::SQLAssignment(ass) => ass.to_string(),
ASTNode::SQLIsNull(ast) => format!("{} IS NULL", ast.as_ref().to_string()),
ASTNode::SQLIsNotNull(ast) => format!("{} IS NOT NULL", ast.as_ref().to_string()),
ASTNode::SQLBinaryExpr { left, op, right } => format!(
@ -295,7 +292,6 @@ impl ToString for ASTNode {
}
/// SQL assignment `foo = expr` as used in SQLUpdate
/// TODO: unify this with the ASTNode SQLAssignment
#[derive(Debug, Clone, PartialEq)]
pub struct SQLAssignment {
id: String,