Package edu.caltech.nanodb.commands
Class UpdateValue
- java.lang.Object
-
- edu.caltech.nanodb.commands.UpdateValue
-
public class UpdateValue extends java.lang.Object
This class represents a single column-name/expression pair in an UPDATE statement's SET clause.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
columnName
The column that will receive the value when the update is applied to a tuple.private Expression
expression
The expression that will be computed and stored.
-
Constructor Summary
Constructors Constructor Description UpdateValue(java.lang.String colName, Expression e)
Construct an update-value object from a column name and an expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getColumnName()
Expression
getExpression()
Returns the expression for generating the update-value.java.lang.String
toString()
-
-
-
Field Detail
-
columnName
private java.lang.String columnName
The column that will receive the value when the update is applied to a tuple.
-
expression
private Expression expression
The expression that will be computed and stored.
-
-
Constructor Detail
-
UpdateValue
public UpdateValue(java.lang.String colName, Expression e)
Construct an update-value object from a column name and an expression.- Parameters:
colName
- The column name that will receive the value.e
- The expression that generates the value to store.- Throws:
java.lang.NullPointerException
- ifcolName
ore
isnull
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getColumnName
public java.lang.String getColumnName()
-
getExpression
public Expression getExpression()
Returns the expression for generating the update-value.
-
-