Search Results for

    Show / Hide Table of Contents

    Class FormulaFunctionsWithQueryRunnerResults

    The context supplied while executing formulas that are pass parameters to IQueryRunnerStep while processing a IQueryRunner

    Inheritance
    object
    StandardFunctions
    FormulaFunctions
    FormulaFunctionsWithQueryRunnerResults
    Implements
    IFormulaFunctions
    Inherited Members
    FormulaFunctions.ShareThisQueryCacheWithTarget(IFormulaFunctions)
    FormulaFunctions.SetQueryRunnerHelper(Func<IEntityUpdater, ISQLWrapperInterpretor, Dictionary<string, string>, QueryableExecuter<ISQLWrapperResult>, Task<DataRow[]>>)
    FormulaFunctions.GetItemPropertyValue(object, string)
    FormulaFunctions.GetTaskID(string)
    FormulaFunctions.GetTaskParameter(string)
    FormulaFunctions.SetObjectValue(object, string, object)
    FormulaFunctions.GetObjectValue(object, string)
    FormulaFunctions.GetExtendedPropertyValue(IBaseEntity, string, string)
    FormulaFunctions.GetExtendedPropertyItem(IBaseEntity, string)
    FormulaFunctions.GetExtendedObject(IBaseEntity, string, bool)
    FormulaFunctions.GetEntityTypeID(string)
    FormulaFunctions.Evaluate<T>(string, bool)
    FormulaFunctions.IsValid<T>(string)
    FormulaFunctions.IsValid<T>(string, Type)
    FormulaFunctions.GetContextItemType(object)
    FormulaFunctions.GetItemFromDataSourceID(string, string)
    FormulaFunctions.GetItemFromDataSourceID(string, string, string)
    FormulaFunctions.GetItem(string, Guid)
    FormulaFunctions.GetItemAs<T>(Guid)
    FormulaFunctions.GetItems(string, QueryableFilter)
    FormulaFunctions.GetFirstOrDefaultItem(string, QueryableFilter)
    FormulaFunctions.GetItems(string, string, SQLOperator, object)
    FormulaFunctions.GetFirstOrDefaultItem(string, string, SQLOperator, object)
    FormulaFunctions.GetItems<T>(QueryableFilter)
    FormulaFunctions.GetFirstOrDefaultItem<T>(QueryableFilter)
    FormulaFunctions.GetItems<T>(string, SQLOperator, object)
    FormulaFunctions.GetFirstOrDefaultItem<T>(string, SQLOperator, object)
    FormulaFunctions.GetEnumValue(object)
    FormulaFunctions.GetEnumCode(object)
    FormulaFunctions.XIRR(string, string, string, params string[])
    FormulaFunctions.XIRR(string, string, string, (string, object)[], params string[])
    FormulaFunctions.TWR(string, string, string, string, params string[])
    FormulaFunctions.TWRRow(string, string, string, string, params string[])
    FormulaFunctions.RunQuery(string, string, params string[])
    FormulaFunctions.HasQueryResult(string, params string[])
    FormulaFunctions.GetQueryResult(ISQLWrapperResult, string)
    FormulaFunctions.GetQueryResult(DataRow, string)
    FormulaFunctions.GetQueryResult(string, string, ISQLWrapperResult)
    FormulaFunctions.GetQueryResult(string, string, DataRow)
    FormulaFunctions.GetQueryResult(string, string, ISQLWrapperResult[], string, object)
    FormulaFunctions.RunQueryResult(string, params string[])
    FormulaFunctions.RunDRQueryResult(string, params string[])
    FormulaFunctions.LogInfo(string, params object[])
    FormulaFunctions.LogError(Exception, string, params object[])
    FormulaFunctions.GetQueryCount(string, string, string)
    FormulaFunctions.GetQueryItems(string, string, string, string)
    FormulaFunctions.GetDRQueryItems(string, string, string, string)
    FormulaFunctions.Data
    FormulaFunctions.Cache
    FormulaFunctions.Services
    FormulaFunctions.User
    StandardFunctions.FormatAsString(object)
    StandardFunctions.Null()
    StandardFunctions.IsNull(object)
    StandardFunctions.Not(bool)
    StandardFunctions.Or(bool, bool)
    StandardFunctions.And(bool, bool)
    StandardFunctions.Sin(double)
    StandardFunctions.Cos(double)
    StandardFunctions.Now()
    StandardFunctions.Today()
    StandardFunctions.TodayString()
    StandardFunctions.EndOfMonth(DateTime)
    StandardFunctions.BeginningOfMonth(DateTime)
    StandardFunctions.BeginningOfWeek(DateTime)
    StandardFunctions.EndOfYear(DateTime)
    StandardFunctions.EndOfDay(DateTime)
    StandardFunctions.Floor(decimal)
    StandardFunctions.Ceiling(decimal)
    StandardFunctions.BeginningOfYear(DateTime)
    StandardFunctions.BeginningOfDay(DateTime)
    StandardFunctions.Random(int, int)
    StandardFunctions.Trim(string)
    StandardFunctions.TrimStart(string, char[])
    StandardFunctions.TrimEnd(string, char[])
    StandardFunctions.PadLeft(string, int, char)
    StandardFunctions.PadRight(string, int, char)
    StandardFunctions.Mod(double, double)
    StandardFunctions.If(bool, object, object)
    StandardFunctions.IsIn(object, object)
    StandardFunctions.IsIn(object, object, object)
    StandardFunctions.IsIn(object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object, object, object)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.Format(object, string)
    StandardFunctions.Lower(string)
    StandardFunctions.Upper(string)
    StandardFunctions.WCase(string)
    StandardFunctions.Date(int, int, int)
    StandardFunctions.Year(DateTime)
    StandardFunctions.Month(DateTime)
    StandardFunctions.Day(DateTime)
    StandardFunctions.WeekDay(DateTime)
    StandardFunctions.Replace(string, string, string)
    StandardFunctions.Substr(string, int, int)
    StandardFunctions.Len(string)
    StandardFunctions.Abs(double)
    StandardFunctions.Int(object)
    StandardFunctions.Trunc(double, int)
    StandardFunctions.Dec(object)
    StandardFunctions.Round(object)
    StandardFunctions.IsBlank(string)
    StandardFunctions.Round(object, int)
    StandardFunctions.Min(double, double, double, double, double)
    StandardFunctions.Max(double, double, double, double, double)
    StandardFunctions.Chr(int)
    StandardFunctions.ChCR()
    StandardFunctions.ChLF()
    StandardFunctions.ChCRLF()
    StandardFunctions.Money(object)
    StandardFunctions.Contains(string, string)
    StandardFunctions.FormatDate(DateTime, string)
    StandardFunctions.Sqrt(double)
    StandardFunctions.Power(double, double)
    StandardFunctions.ValString(object)
    StandardFunctions.ValBool(object)
    StandardFunctions.ValDate(object)
    StandardFunctions.ValDateTimeOffset(object)
    StandardFunctions.ValDecimal(object)
    StandardFunctions.ValLong(object)
    StandardFunctions.ValID(object)
    StandardFunctions.DateAdd(DateTime, decimal, decimal, decimal)
    StandardFunctions.DateAdd(DateTimeOffset, decimal, decimal, decimal)
    StandardFunctions.DateAddWorkDays(DateTime, decimal)
    StandardFunctions.DateAdd(DateTime, DateTime)
    StandardFunctions.DayDifference(DateTime, DateTime)
    StandardFunctions.DayDifferenceWorkDays(DateTime, DateTime)
    StandardFunctions.HourDifference(DateTime, DateTime)
    StandardFunctions.MinuteDifference(DateTime, DateTime)
    StandardFunctions.YearDifference(DateTime, DateTime)
    StandardFunctions.NullDate()
    StandardFunctions.NullDateTimeOffset()
    StandardFunctions.TempValue1
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    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.

    Implements

    IFormulaFunctions

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    FormulaFunctionsWithContext<T>
    FormulaFunctions
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.