Class FormulaFunctionsWithQueryRunnerResults
The context supplied while executing formulas that are pass parameters to IQueryRunnerStep while processing a IQueryRunner
Implements
Inherited Members
Namespace: LemonEdge.API.Core.Formulas
Assembly: LemonEdge.API.Core.dll
Syntax
public class FormulaFunctionsWithQueryRunnerResults : FormulaFunctions, IFormulaFunctions
Constructors
FormulaFunctionsWithQueryRunnerResults(IEntityRetriever, IReadOnlyCache, UserInfo, Dictionary<string, object>, IBaseEntity, ISQLWrapperInterpretor, ISQLWrapperResult, string, int, IQueryRunnerStep, IQueryRunner, IFormulaFunctionsServiceContext)
Creates a new formula functions for helping with custom formulas as a context to operate against
Declaration
public FormulaFunctionsWithQueryRunnerResults(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, Dictionary<string, object> parameters, IBaseEntity entityResult, ISQLWrapperInterpretor interpretor, ISQLWrapperResult result, string uniqueKeyForThisRunnerExecution, int runnerExecutionRowNumber, IQueryRunnerStep step, IQueryRunner runner, IFormulaFunctionsServiceContext services)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityRetriever | retriever | A context allowing formulas to load and query any data from LemonEdge |
| IReadOnlyCache | cache | A local cache |
| UserInfo | user | The current user executing the formula |
| Dictionary<string, object> | parameters | All parameters provided for executing the query runner sql wrapper |
| IBaseEntity | entityResult | The entity result if this runner is enumerating a list of entities. Can be null if enumerating results from a SQL Wrapper instead. |
| ISQLWrapperInterpretor | interpretor | |
| ISQLWrapperResult | result | The actual current result from the query runner sql wrapper that is being used to execute this step. Can be null if using an entity result set instead |
| string | uniqueKeyForThisRunnerExecution | The unique key for this execution of the query runner sql wrapper |
| int | runnerExecutionRowNumber | The current row number for this result of the query runner sql wrapper |
| IQueryRunnerStep | step | The current step this result is being used to execute |
| IQueryRunner | runner | |
| IFormulaFunctionsServiceContext | services | The services demanded from the IServiceProvider for use in formulas |
Properties
QueryRunner
The query runner this result is being executed against
Declaration
public IQueryRunner QueryRunner { get; }
Property Value
| Type | Description |
|---|---|
| IQueryRunner |
QueryRunnerStep
The query runner step this result is being executed against
Declaration
public IQueryRunnerStep QueryRunnerStep { get; }
Property Value
| Type | Description |
|---|---|
| IQueryRunnerStep |
RunnerExecutionRowNumber
The number of the row result from the query executed against the query runner
Declaration
public int RunnerExecutionRowNumber { get; }
Property Value
| Type | Description |
|---|---|
| int |
UniqueKeyForThisRunnerExecution
The unique key for the run instance of this IQueryRunner
Declaration
public string UniqueKeyForThisRunnerExecution { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetOriginalRunnerParameter(string)
Returns the original parameter value used for the Query Runner from the specified parameter name.
Declaration
[FormulaFunction(Name = "GetOriginalRunnerParameter", Type = "QueryRunner", Description = "Returns the original parameter value used for the Query Runner from the specified parameter name.", Params = "1. The name of the original parameter you want to return the value of.", ParamCount = 1, IsAsync = false)]
public object GetOriginalRunnerParameter(string paramName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | paramName | The name of the original parameter you want to return the value of. |
Returns
| Type | Description |
|---|---|
| object | The original parameter value used for the Query Runner from the specified parameter name. |
GetRunnerResult(string)
Returns the result value from the Query Runner from the specified column/property name.
Declaration
[FormulaFunction(Name = "GetRunnerResult", Type = "QueryRunner", Description = "Returns the result value from the Query Runner from the specified column name.", Params = "1. The name of the column, or property, for the result you want to return the value of.", ParamCount = 1, IsAsync = false)]
public object GetRunnerResult(string columnName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName | The name of the column, or property, for the result you want to return the value of. |
Returns
| Type | Description |
|---|---|
| object | The result value from the Query Runner from the specified column/property name. |