24 namespace Deveel.Data.Routines {
27 var info = query.ResolveFunctionInfo(invoke);
36 var
function = query.ResolveFunction(invoke);
37 return function != null &&
function.FunctionType ==
FunctionType.Aggregate;
41 var routine = query.ResolveSystemRoutine(invoke);
43 routine = query.ResolveUserRoutine(invoke);
52 foreach (var resolver
in resolvers) {
62 var routine = query.
Session.ResolveRoutine(invoke);
63 if (routine != null &&
64 !query.UserCanExecute(routine.Type, invoke))
65 throw new InvalidOperationException();
71 return query.ResolveRoutine(invoke) as
IFunction;
75 var invoke =
new Invoke(functionName, args);
76 return query.ResolveFunction(invoke);
84 var routine = query.ResolveRoutine(invoke);
88 return routine.RoutineInfo;
94 var invoke =
new Invoke(resolvedName, args);
95 return query.InvokeFunction(invoke);
99 var result = invoke.
Execute(query);
105 return query.InvokeFunction(
new Invoke(functionName, args));
The system uses instances of this interface to resolve routines given a user invocation.
Defines a routine that is a function, that means it returns a value after its execution.
static DataObject InvokeFunction(this IQuery query, Invoke invoke)
static RoutineInfo ResolveRoutineInfo(this IQuery query, Invoke invoke)
static IRoutine ResolveRoutine(this IQuery query, Invoke invoke)
static IRoutine ResolveSystemRoutine(this IQuery query, Invoke invoke)
Describes the name of an object within a database.
The contract to define a program routine that can interact with database objects. ...
static bool IsSystemFunction(this IQuery query, Invoke invoke)
static IRoutine ResolveUserRoutine(this IQuery query, Invoke invoke)
static DataObject InvokeSystemFunction(this IQuery query, string functionName, params SqlExpression[] args)
static IFunction ResolveFunction(this IQuery query, ObjectName functionName, params SqlExpression[] args)
static readonly ObjectName SchemaName
The name of the system schema as ObjectName.
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
The information about the invocation of a routine, including the full name and arguments (as SqlExpre...
DataObject ReturnValue
If the context of the result is a function, gets the return value of the function.
FunctionType
The different type of a function.
Provides utilities and properties for handling the SYSTEN schema of a database.
static bool IsAggregateFunction(this IQuery query, Invoke invoke)
The function signature information that are used to resolve a function within a context.
static DataObject InvokeFunction(this IQuery query, ObjectName functionName, params SqlExpression[] args)
static IFunction ResolveFunction(this IQuery query, Invoke invoke)
IRoutine ResolveRoutine(Invoke request, IQuery query)
Resolves a routine that matches the given invocation within the context provided. ...
Defines the metadata for a routine that are used to resolve within a context.
Defines the base class for instances that represent SQL expression tree nodes.
static FunctionInfo ResolveFunctionInfo(this IQuery query, Invoke invoke)
new IQueryContext Context