Search Results for

    Show / Hide Table of Contents

    Interface IReaderFactory

    Handles creation of various types of SQL readers.

    Namespace: LemonEdge.DataAccess.Core.Abstractions.Factories
    Assembly: LemonEdge.DataAccess.Core.Abstractions.dll
    Syntax
    public interface IReaderFactory

    Methods

    CreateSqlReader(IDataAccessor, string[], Type[], string, IEnumerable<DbParameter>, CancellationToken)

    Declaration
    IReader CreateSqlReader(IDataAccessor accessor, string[] columns, Type[] colTypes, string sql, IEnumerable<DbParameter> parameters, CancellationToken token)
    Parameters
    Type Name Description
    IDataAccessor accessor
    string[] columns
    Type[] colTypes
    string sql
    IEnumerable<DbParameter> parameters
    CancellationToken token
    Returns
    Type Description
    IReader

    CreateSqlSelectBuilderReader(IDataAccessor, IQuerySelectBuilder, IEnumerable<DbParameter>, string, QueryableExecuter, Func<string, string>, string[], Type[], CancellationToken)

    Runs sql (applying any given filters) and writes results to csv file stream. Use the IReaderFactory to create.

    Declaration
    ISelectBuilderReader CreateSqlSelectBuilderReader(IDataAccessor accessor, IQuerySelectBuilder builder, IEnumerable<DbParameter> parameters, string prefixSQL, QueryableExecuter executor, Func<string, string> filterTranslator, string[] columns, Type[] colType, CancellationToken token)
    Parameters
    Type Name Description
    IDataAccessor accessor

    For running database access queries

    IQuerySelectBuilder builder

    SQL builder selecting result set

    IEnumerable<DbParameter> parameters

    The list of params

    string prefixSQL

    Any sql that is always applied before the builder sql. This is for stored procedures, where the results can be inserted into a matching table. The table can be selected from and have filters applied before returning the results.

    QueryableExecuter executor

    Executor containing ordering, filtering information to apply to sql builder

    Func<string, string> filterTranslator
    string[] columns

    List of columns to return

    Type[] colType
    CancellationToken token
    Returns
    Type Description
    ISelectBuilderReader

    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.