Search Results for

    Show / Hide Table of Contents

    Interface ISQLWrapperInterpretor

    Inherited Members
    IQueryableItem.GetFields(IReadOnlyCache)
    IQueryableItem.GetParams(IReadOnlyCache)
    IQueryableItem.GetSQLToSelectFrom(long, IEnumerable<(IQueryableParamInfo Param, string SQLValue)>, IEnumerable<string>)
    IQueryableItem.GetCustomInitSQLForSP(long, IEnumerable<(IQueryableParamInfo Param, string SQLValue)>)
    IQueryableItem.ReplicateForAll(string, string, long, IEnumerable<(IQueryableParamInfo Param, string SQLValue)>, IEnumerable<string>)
    IQueryableItem.TopName
    Namespace: LemonEdge.API.Entities.Helpers
    Assembly: LemonEdge.API.dll
    Syntax
    public interface ISQLWrapperInterpretor : IQueryableItem

    Properties

    Chains

    All chained queries from this one

    Declaration
    IReadOnlyDictionary<ISQLWrapperChain, IEnumerable<ISQLWrapperChainLink>> Chains { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<ISQLWrapperChain, IEnumerable<ISQLWrapperChainLink>>

    Columns

    A list of all the columns in the schema of this sql wrapper

    Declaration
    IEnumerable<ISQLTypeWrapper> Columns { get; }
    Property Value
    Type Description
    IEnumerable<ISQLTypeWrapper>

    DefaultOpenableColumn

    Declaration
    ISQLTypeWrapper DefaultOpenableColumn { get; }
    Property Value
    Type Description
    ISQLTypeWrapper

    GetColumnResultCount

    Returns the total count of columns in the sql wrapper

    Declaration
    int GetColumnResultCount { get; }
    Property Value
    Type Description
    int

    GetParametersCount

    Returns the total count of parameters in the sql wrapper

    Declaration
    int GetParametersCount { get; }
    Property Value
    Type Description
    int

    HasPostProcessCalculation

    Declaration
    bool HasPostProcessCalculation { get; }
    Property Value
    Type Description
    bool

    ID

    The name of this sql wrapper

    Declaration
    string ID { get; }
    Property Value
    Type Description
    string

    IsSP

    Returns true if this sql wrapper is configured as a stored procedure

    Declaration
    bool IsSP { get; }
    Property Value
    Type Description
    bool

    Loaded

    Returns true if the sql wrapper interpretor has been loaded as has the full schema of the sql wrapper

    Declaration
    bool Loaded { get; }
    Property Value
    Type Description
    bool

    LoadedChains

    Returns true if the sql wrapper interpretor has loaded all chain info

    Declaration
    bool LoadedChains { get; }
    Property Value
    Type Description
    bool

    Name

    The name of this sql wrapper

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string

    OpenableColumns

    Returns a collection of columns that contain values that hold global ids that uniquely identify entities in the system

    These entities in turn may be capable of being opened within the UI

    Declaration
    IEnumerable<ISQLTypeWrapper> OpenableColumns { get; }
    Property Value
    Type Description
    IEnumerable<ISQLTypeWrapper>

    Parameters

    A list of all the parameters in the schema of this sql wrapper

    Declaration
    IEnumerable<ISQLTypeWrapper> Parameters { get; }
    Property Value
    Type Description
    IEnumerable<ISQLTypeWrapper>

    SubID

    A sql wrapper does not have a sub id as a queryable item

    Declaration
    string SubID { get; }
    Property Value
    Type Description
    string

    UseCore

    Declaration
    bool UseCore { get; }
    Property Value
    Type Description
    bool

    Wrapper

    The sql wrapper this interpretor is working with

    Declaration
    ISQLWrapper Wrapper { get; }
    Property Value
    Type Description
    ISQLWrapper

    Methods

    AddTableStructure(DataSet, string)

    Declaration
    DataTable AddTableStructure(DataSet set, string tableName)
    Parameters
    Type Name Description
    DataSet set
    string tableName
    Returns
    Type Description
    DataTable

    ColumnMappableToSQLWrapperResult(ISQLTypeWrapper)

    Returns true if the column can have its result stored against a ISQLWrapperResult

    The ISQLWrapperResult has a limit of certain number of text/decimal/etc columns. This prevents extra column being displayed in a grid, though the results can still be written to csv/etc.

    If you require all the properties you can create your own complex type to hold all the results and use that instead of the default ISQLWrapperResult
    Declaration
    bool ColumnMappableToSQLWrapperResult(ISQLTypeWrapper col)
    Parameters
    Type Name Description
    ISQLTypeWrapper col

    The column to check if its results can be held against a ISQLWrapperResult

    Returns
    Type Description
    bool

    True if the column can have its result stored against a ISQLWrapperResult

    FillResults(DataTable, IReader)

    Declaration
    Task FillResults(DataTable table, IReader csv)
    Parameters
    Type Name Description
    DataTable table
    IReader csv
    Returns
    Type Description
    Task

    GetColumn(string)

    Returns the column definition given the specified binding against a property on ISQLWrapperResult

    Declaration
    ISQLTypeWrapper GetColumn(string binding)
    Parameters
    Type Name Description
    string binding

    A name of a property on ISQLWrapperResult that we want the column defintion of

    Returns
    Type Description
    ISQLTypeWrapper

    The column definition given the specified binding against a property on ISQLWrapperResult

    GetColumnBinding(ISQLTypeWrapper)

    Returns the binding the system will use to bind the value of this column to a property on the ISQLWrapperResult

    Declaration
    string GetColumnBinding(ISQLTypeWrapper typeWrapper)
    Parameters
    Type Name Description
    ISQLTypeWrapper typeWrapper

    The column which we want the binding for the values it holds being stored against a ISQLWrapperResult

    Returns
    Type Description
    string

    The binding the system will use to bind the value of this column to a property on the ISQLWrapperResult

    GetDefaultParameterValue(ISQLTypeWrapper, IEntityRetriever, IReadOnlyCache, UserInfo, IServiceContext)

    Declaration
    Task<object> GetDefaultParameterValue(ISQLTypeWrapper parameter, IEntityRetriever cn, IReadOnlyCache cache, UserInfo user, IServiceContext context)
    Parameters
    Type Name Description
    ISQLTypeWrapper parameter
    IEntityRetriever cn
    IReadOnlyCache cache
    UserInfo user
    IServiceContext context
    Returns
    Type Description
    Task<object>

    GetRelatedItemType(ISQLTypeWrapper)

    Returns the entitydescriptor describing the type of globally unique id that the specified column holds

    Declaration
    EntityDescriptor GetRelatedItemType(ISQLTypeWrapper col)
    Parameters
    Type Name Description
    ISQLTypeWrapper col

    The column which holds a unique id

    Returns
    Type Description
    EntityDescriptor

    The entitydescriptor describing the type of globally unique id that the specified column holds

    GetResultValue(ISQLWrapperResult, ISQLTypeWrapper)

    Given a result, and a column from the sqlwrapper, this will return the actual value of the result

    Declaration
    object GetResultValue(ISQLWrapperResult result, ISQLTypeWrapper col)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    A result holding values retrieved from executing this SQLWrapper

    ISQLTypeWrapper col

    The column to return the value for

    Returns
    Type Description
    object

    Returns the value held against a result for the specified column

    GetResultValue(ISQLWrapperResult, string)

    Given a result, and the name of a column (from the sqlwrapper schema of the column name stored on Name), this will return the actual value of the result

    Declaration
    object GetResultValue(ISQLWrapperResult result, string columnName)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    A result holding values retrieved from executing this SQLWrapper

    string columnName

    The Name of a column to return the value for

    Returns
    Type Description
    object

    Returns the value held against a result for the specified column

    GetResultValue(DataRow, ISQLTypeWrapper)

    Given a result, and a column from the sqlwrapper, this will return the actual value of the result

    Declaration
    object GetResultValue(DataRow result, ISQLTypeWrapper col)
    Parameters
    Type Name Description
    DataRow result

    A result holding values retrieved from executing this SQLWrapper

    ISQLTypeWrapper col

    The column to return the value for

    Returns
    Type Description
    object

    Returns the value held against a result for the specified column

    GetResultValue(DataRow, string)

    Given a result, and the name of a column (from the sqlwrapper schema of the column name stored on Name), this will return the actual value of the result

    Declaration
    object GetResultValue(DataRow result, string columnName)
    Parameters
    Type Name Description
    DataRow result

    A result holding values retrieved from executing this SQLWrapper

    string columnName

    The Name of a column to return the value for

    Returns
    Type Description
    object

    Returns the value held against a result for the specified column

    GetResultValue<T>(ISQLWrapperResult, ISQLTypeWrapper)

    Given a result, and a column from the sqlwrapper, this will return the actual value of the result

    Declaration
    T GetResultValue<T>(ISQLWrapperResult result, ISQLTypeWrapper col)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    A result holding values retrieved from executing this SQLWrapper

    ISQLTypeWrapper col

    The column to return the value for

    Returns
    Type Description
    T

    Returns the value held against a result for the specified column

    Type Parameters
    Name Description
    T

    The type of the value that should be returned for this property

    GetResultValue<T>(ISQLWrapperResult, string)

    Given a result, and the name of a column (from the sqlwrapper schema of the column name stored on Name), this will return the actual value of the result

    Declaration
    T GetResultValue<T>(ISQLWrapperResult result, string columnName)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    A result holding values retrieved from executing this SQLWrapper

    string columnName

    The Name of a column to return the value for

    Returns
    Type Description
    T

    Returns the value held against a result for the specified column

    Type Parameters
    Name Description
    T

    The type of the value that should be returned for this property

    GetResultValue<T>(DataRow, ISQLTypeWrapper)

    Given a result, and a column from the sqlwrapper, this will return the actual value of the result

    Declaration
    T GetResultValue<T>(DataRow result, ISQLTypeWrapper col)
    Parameters
    Type Name Description
    DataRow result

    A result holding values retrieved from executing this SQLWrapper

    ISQLTypeWrapper col

    The column to return the value for

    Returns
    Type Description
    T

    Returns the value held against a result for the specified column

    Type Parameters
    Name Description
    T

    The type of the value that should be returned for this property

    HasResultColumn(string)

    Declaration
    bool HasResultColumn(string columnName)
    Parameters
    Type Name Description
    string columnName
    Returns
    Type Description
    bool

    Load(IEntityRetriever)

    Loads all the parameters and column information for the sql wrapper for this interpretor

    Uses a context instead of a cache for when the wrapper may have changes, or is being modified by the user

    Declaration
    Task Load(IEntityRetriever retriever)
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context to load the sql wrapper schema with

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Load(IReadOnlyCache)

    Loads all the parameters and column information for the sql wrapper for this interpretor

    Uses a cache instead of a context for when the wrapper does not have changes and just needs a quick method to load and typically execute/display results

    Declaration
    Task Load(IReadOnlyCache cache)
    Parameters
    Type Name Description
    IReadOnlyCache cache

    A local cache to load the sql wrapper schema from

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    LoadChains(IReadOnlyCache)

    Loads all the chain info for this sql wrapper

    Declaration
    Task LoadChains(IReadOnlyCache cache)
    Parameters
    Type Name Description
    IReadOnlyCache cache

    A local cache to load the sql wrapper schema from

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    MapResult(ISQLWrapperResult, object)

    Given a result this will map all the values to the appropriate properties in the given class

    Declaration
    object MapResult(ISQLWrapperResult result, object newResult)
    Parameters
    Type Name Description
    ISQLWrapperResult result
    object newResult
    Returns
    Type Description
    object

    MapResultForJson(ISQLWrapperResult)

    Given a result this will map all the values to the appropriate properties creating a dictionary that can be serialized to JSON

    Declaration
    Dictionary<string, object> MapResultForJson(ISQLWrapperResult result)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    A result holding values retrieved from executing this SQLWrapper

    Returns
    Type Description
    Dictionary<string, object>

    A dictionary mapping all the values to their column names

    MapResult<T>(ISQLWrapperResult, T)

    Declaration
    T MapResult<T>(ISQLWrapperResult result, T newResult)
    Parameters
    Type Name Description
    ISQLWrapperResult result
    T newResult
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    MapToOnlyColumns(IEnumerable<string>)

    Declaration
    void MapToOnlyColumns(IEnumerable<string> columns)
    Parameters
    Type Name Description
    IEnumerable<string> columns

    Reload(IEntityRetriever)

    Forces a loads of all the parameters and column information for the sql wrapper for this interpretor

    Uses a context instead of a cache for when the wrapper may have changes, or is being modified by the user

    Declaration
    Task Reload(IEntityRetriever retriever)
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context to load the sql wrapper schema with

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    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)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.