Interface SqlExpression
- All Known Implementing Classes:
SqlCast,SqlColumnJoin,SqlColumnValue,SqlCount
public interface SqlExpression
An expression in used in select statements and internal sorting.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Objectevaluate(AoservConnector conn, AoservObject<?, ?> obj) Evaluates the expression on the given connector and object.default ObjectevaluateAggregate(AoservConnector conn, List<AoservObject<?, ?>> rows) Evaluates the aggregate expression on the given connector and rows.default voidgetReferencedTables(AoservConnector conn, List<Table> tables) Gets all of the tables referenced by this expression.getType()The return type of this expression.booleanIs this an aggregate function?
-
Method Details
-
getColumnName
String getColumnName() -
evaluate
default Object evaluate(AoservConnector conn, AoservObject<?, ?> obj) throws IOException, SQLExceptionEvaluates the expression on the given connector and object.- Throws:
IOExceptionSQLException
-
evaluateAggregate
default Object evaluateAggregate(AoservConnector conn, List<AoservObject<?, ?>> rows) throws IOException, SQLExceptionEvaluates the aggregate expression on the given connector and rows.- Throws:
IOExceptionSQLException
-
isAggregate
boolean isAggregate()Is this an aggregate function? Controls whether evaluation is performed viaevaluate(com.aoindustries.aoserv.client.AoservConnector, com.aoindustries.aoserv.client.AoservObject)orevaluateAggregate(com.aoindustries.aoserv.client.AoservConnector, java.util.List). Please be sure to implement the corresponding evaluation function. -
getType
Type getType()The return type of this expression. -
getReferencedTables
default void getReferencedTables(AoservConnector conn, List<Table> tables) throws IOException, SQLException Gets all of the tables referenced by this expression.- Throws:
IOExceptionSQLException
-
