39 throw new ArgumentNullException(
"context");
44 throw new Exception(
String.Format(
"'{0}' can only be used as an aggregate function.", FunctionName));
48 int size = group.Count;
59 for (
int i = 0; i < size; ++i) {
60 val = group.Resolve(v, i);
61 result = Evaluate(result, val, context.
Request, group);
68 for (
int i = 0; i < size; ++i) {
69 val = exp.EvaluateToConstant(context.
Request, group.GetVariableResolver(i));
70 result = Evaluate(result, val, context.
Request, group);
75 result = PostEvaluate(result, context.
Request, group);
77 return context.
Result(result);
A type that represents an aggregate function.
A long string in the system.
A system routine that returns a value at the end of its execution.
static DataObject Null(SqlType type)
SqlExpression[] Arguments
Gets the array of expressions forming the arguments of the execution.
Describes the name of an object within a database.
override InvokeResult Execute(InvokeContext context)
Executes the function and provides a result.
AggregateFunction(ObjectName name, RoutineParameter[] parameters, SqlType returnType)
virtual DataObject PostEvaluate(DataObject result, IRequest query, IGroupResolver group)
IGroupResolver GroupResolver
Defines a contract used by grouping functions to find information about the current group being evalu...
Represents the result of the execution of a routine.
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
FunctionType
The different type of a function.
Defines the properties of a specific SQL Type and handles the values compatible.
InvokeResult Result(DataObject value)