DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | List of all members
Deveel.Data.Routines.Function Class Referenceabstract

A system routine that returns a value at the end of its execution. More...

Inheritance diagram for Deveel.Data.Routines.Function:
Deveel.Data.Routines.IFunction Deveel.Data.Routines.IRoutine Deveel.Data.Sql.IDbObject Deveel.Data.Routines.AggregateFunction Deveel.Data.Routines.ExternalFunction Deveel.Data.Routines.FunctionProvider.DelegateFunction Deveel.Data.Routines.PlSqlFunction Deveel.Data.Routines.UserFunction

Classes

class  DynamicSqlType
 

Public Member Functions

abstract InvokeResult Execute (InvokeContext context)
 Executes the function and provides a result. More...
 
SqlType ReturnType ()
 Gets the function static return type More...
 
virtual SqlType ReturnType (InvokeContext context)
 Resolves the function return type against the given context. More...
 

Static Public Attributes

static readonly SqlType DynamicType = new DynamicSqlType()
 A special SqlType that is used to mark an argument of a function as dynamic. More...
 

Protected Member Functions

 Function (FunctionInfo functionInfo)
 
 Function (ObjectName name, RoutineParameter[] parameters, FunctionType functionType)
 
 Function (ObjectName name, RoutineParameter[] parameters, SqlType returnType)
 
 Function (ObjectName name, RoutineParameter[] parameters, SqlType returnType, FunctionType functionType)
 

Properties

FunctionType FunctionType [get]
 
FunctionInfo FunctionInfo [get, private set]
 
ObjectName FunctionName [get]
 
RoutineInfo IRoutine. RoutineInfo [get]
 
RoutineType IRoutine. Type [get]
 
DbObjectType IDbObject. ObjectType [get]
 
ObjectName IDbObject. FullName [get]
 
- Properties inherited from Deveel.Data.Routines.IFunction
FunctionType FunctionType [get]
 Gets the type of function. More...
 
- Properties inherited from Deveel.Data.Routines.IRoutine
RoutineType Type [get]
 Gets the type of routine that will be executed. More...
 
RoutineInfo RoutineInfo [get]
 
- Properties inherited from Deveel.Data.Sql.IDbObject
ObjectName FullName [get]
 Gets the fully qualified name of the object used to resolve it uniquely within the database. More...
 
DbObjectType ObjectType [get]
 Gets the type of database object that the implementation is for More...
 

Detailed Description

A system routine that returns a value at the end of its execution.

This class provides the base features for constructing functions.

Definition at line 31 of file Function.cs.

Constructor & Destructor Documentation

Deveel.Data.Routines.Function.Function ( FunctionInfo  functionInfo)
inlineprotected

Definition at line 41 of file Function.cs.

41  {
42  if (functionInfo == null)
43  throw new ArgumentNullException("functionInfo");
44 
45  FunctionInfo = functionInfo;
46  }
Deveel.Data.Routines.Function.Function ( ObjectName  name,
RoutineParameter[]  parameters,
FunctionType  functionType 
)
inlineprotected

Definition at line 48 of file Function.cs.

49  : this(name, parameters, null, functionType) {
50  }
Deveel.Data.Routines.Function.Function ( ObjectName  name,
RoutineParameter[]  parameters,
SqlType  returnType 
)
inlineprotected

Definition at line 52 of file Function.cs.

53  : this(name, parameters, returnType, FunctionType.Static) {
54  }
Deveel.Data.Routines.Function.Function ( ObjectName  name,
RoutineParameter[]  parameters,
SqlType  returnType,
FunctionType  functionType 
)
inlineprotected

Definition at line 56 of file Function.cs.

57  : this(new FunctionInfo(name, parameters, returnType, functionType)) {
58  }

Member Function Documentation

abstract InvokeResult Deveel.Data.Routines.Function.Execute ( InvokeContext  context)
pure virtual

Executes the function and provides a result.

Parameters
contextThe context of the execution.
Returns
Returns a InvokeResult instance that encapsulates the returned value of the function.
See also
InvokeResult.ReturnValue

Implements Deveel.Data.Routines.IRoutine.

Implemented in Deveel.Data.Routines.FunctionProvider.DelegateFunction, Deveel.Data.Routines.UserFunction, Deveel.Data.Routines.AggregateFunction, and Deveel.Data.Routines.ExternalFunction.

SqlType Deveel.Data.Routines.Function.ReturnType ( )
inline

Gets the function static return type

Returns
Returns an instance of SqlType that defines the type of the returned value.

Definition at line 104 of file Function.cs.

104  {
105  if (FunctionInfo.ReturnType != null)
106  return FunctionInfo.ReturnType;
107 
108  return ReturnType(null);
109  }
SqlType ReturnType()
Gets the function static return type
Definition: Function.cs:104
virtual SqlType Deveel.Data.Routines.Function.ReturnType ( InvokeContext  context)
inlinevirtual

Resolves the function return type against the given context.

Parameters
contextThe execution context used to resolve the function return type.
Returns
Returns an instance of SqlType that defines the type of the returned value resolved against the given execution context..

Implements Deveel.Data.Routines.IFunction.

Reimplemented in Deveel.Data.Routines.FunctionProvider.DelegateFunction, and Deveel.Data.Routines.ExternalFunction.

Definition at line 121 of file Function.cs.

121  {
122  return FunctionInfo.ReturnType;
123  }

Member Data Documentation

readonly SqlType Deveel.Data.Routines.Function.DynamicType = new DynamicSqlType()
static

A special SqlType that is used to mark an argument of a function as dynamic.

This SqlType matches against any passed object.

Definition at line 39 of file Function.cs.

Property Documentation

ObjectName IDbObject. Deveel.Data.Routines.Function.FullName
getprivate

Definition at line 82 of file Function.cs.

FunctionInfo Deveel.Data.Routines.Function.FunctionInfo
getprivate set

Definition at line 64 of file Function.cs.

ObjectName Deveel.Data.Routines.Function.FunctionName
get

Definition at line 66 of file Function.cs.

FunctionType Deveel.Data.Routines.Function.FunctionType
get

Definition at line 60 of file Function.cs.

DbObjectType IDbObject. Deveel.Data.Routines.Function.ObjectType
getprivate

Definition at line 78 of file Function.cs.

RoutineInfo IRoutine. Deveel.Data.Routines.Function.RoutineInfo
getprivate

Definition at line 70 of file Function.cs.

RoutineType IRoutine. Deveel.Data.Routines.Function.Type
getprivate

Definition at line 74 of file Function.cs.


The documentation for this class was generated from the following file: