DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Package Functions | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Routines.InvokeResult Class Reference

Represents the result of the execution of a routine. More...

Package Functions

 InvokeResult (InvokeContext context)
 
 InvokeResult (InvokeContext context, DataObject returnValue)
 
void SetOutputParameter (string name, DataObject value)
 

Properties

InvokeContext Context [get, private set]
 Gets the parent context that originated the result. More...
 
DataObject ReturnValue [get, private set]
 If the context of the result is a function, gets the return value of the function. More...
 
bool HasReturnValue [get, private set]
 Gets a boolean value indicating if the function has a ReturnValue. More...
 
bool HasOutputParameters [get]
 Gets a boolean value indicating if the routine has any OUT parameter set. More...
 
IDictionary< string, DataObjectOutputParameters [get]
 Gets a dictionary of the OUT parameters emitted byt the routine. More...
 

Private Member Functions

 InvokeResult (InvokeContext context, DataObject returnValue, bool hasReturn)
 

Private Attributes

Dictionary< string, DataObjectoutputValues
 

Detailed Description

Represents the result of the execution of a routine.

Definition at line 25 of file InvokeResult.cs.

Constructor & Destructor Documentation

Deveel.Data.Routines.InvokeResult.InvokeResult ( InvokeContext  context,
DataObject  returnValue,
bool  hasReturn 
)
inlineprivate

Definition at line 28 of file InvokeResult.cs.

28  {
29  Context = context;
30  ReturnValue = returnValue;
31  HasReturnValue = hasReturn;
32  }
InvokeContext Context
Gets the parent context that originated the result.
Definition: InvokeResult.cs:45
DataObject ReturnValue
If the context of the result is a function, gets the return value of the function.
Definition: InvokeResult.cs:59
bool HasReturnValue
Gets a boolean value indicating if the function has a ReturnValue.
Definition: InvokeResult.cs:69
Deveel.Data.Routines.InvokeResult.InvokeResult ( InvokeContext  context)
inlinepackage

Definition at line 34 of file InvokeResult.cs.

35  : this(context, DataObject.Null(), false) {
36  }
Deveel.Data.Routines.InvokeResult.InvokeResult ( InvokeContext  context,
DataObject  returnValue 
)
inlinepackage

Definition at line 38 of file InvokeResult.cs.

39  : this(context, returnValue, true) {
40  }

Member Function Documentation

void Deveel.Data.Routines.InvokeResult.SetOutputParameter ( string  name,
DataObject  value 
)
inlinepackage

Definition at line 92 of file InvokeResult.cs.

92  {
93  if (Context.RoutineType != RoutineType.Procedure)
94  throw new Exception("Cannot set an output parameter value for a function.");
95 
96  if (outputValues == null)
97  outputValues = new Dictionary<string, DataObject>();
98 
99  outputValues[name] = value;
100  }
RoutineType RoutineType
Gets the type of the routine being executed.
RoutineType
The type of routine program.
Definition: RoutineType.cs:23
Dictionary< string, DataObject > outputValues
Definition: InvokeResult.cs:26
InvokeContext Context
Gets the parent context that originated the result.
Definition: InvokeResult.cs:45

Member Data Documentation

Dictionary<string, DataObject> Deveel.Data.Routines.InvokeResult.outputValues
private

Definition at line 26 of file InvokeResult.cs.

Property Documentation

InvokeContext Deveel.Data.Routines.InvokeResult.Context
getprivate set

Gets the parent context that originated the result.

Definition at line 45 of file InvokeResult.cs.

bool Deveel.Data.Routines.InvokeResult.HasOutputParameters
get

Gets a boolean value indicating if the routine has any OUT parameter set.

See also
OutputParameters

Definition at line 76 of file InvokeResult.cs.

bool Deveel.Data.Routines.InvokeResult.HasReturnValue
getprivate set

Gets a boolean value indicating if the function has a ReturnValue.

This is always set to false when the routine context is of a PROCEDURE, that has no return value by definition.

See also
ReturnValue

Definition at line 69 of file InvokeResult.cs.

IDictionary<string, DataObject> Deveel.Data.Routines.InvokeResult.OutputParameters
get

Gets a dictionary of the OUT parameters emitted byt the routine.

Definition at line 83 of file InvokeResult.cs.

DataObject Deveel.Data.Routines.InvokeResult.ReturnValue
getprivate set

If the context of the result is a function, gets the return value of the function.

This is set to DataObject.Null() by default: the property HasReturnValue assess a return value was really provided by the routine (if the routine is a function).

See also
HasReturnValue

Definition at line 59 of file InvokeResult.cs.


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