package eu.dnetlib.dlms.jdbc.ast;

import java.sql.SQLException;

import eu.dnetlib.dlms.jdbc.ExecutorContext;
import eu.dnetlib.dlms.jdbc.server.IExpressionExecutor;

/**
 * The base class for expressions.
 * 
 * @author alessia
 */
public abstract class Expression extends ASTNode {
	/**
	 * Evaluates this Expression in the given context using the given executor.
	 * 
	 * @param executor
	 *            IExpressionExecutor used for the evaluation
	 * @param context
	 *            ExecutorContext representing the current context for the evaluation
	 * @return the ExecutorContext generated by the evaluation of this Expression
	 * @throws SQLException
	 *             problems during evaluation
	 */
	public abstract Object evaluate(IExpressionExecutor executor, ExecutorContext context) throws SQLException;
}
