Search Results for

    Show / Hide Table of Contents

    Interface IQueryBuilderFiltered

    An IQueryBuilder, but with filtering.

    Inherited Members
    IQueryBuilder.GetCommandText()
    IQueryBuilder.GetCommandText(string)
    IQueryBuilder.MaxQueryWidth
    Namespace: LemonEdge.DataAccess.Core.Abstractions.Builders
    Assembly: LemonEdge.DataAccess.Core.Abstractions.dll
    Syntax
    public interface IQueryBuilderFiltered : IQueryBuilder

    Properties

    CurrentHavingGroup

    Peeks at the top of the stack of HAVINGs

    Declaration
    GroupType CurrentHavingGroup { get; }
    Property Value
    Type Description
    GroupType

    CurrentWhereGroup

    Peeks at the top of the stack of the WHERE groups.

    Declaration
    GroupType CurrentWhereGroup { get; }
    Property Value
    Type Description
    GroupType

    Methods

    AddHavingCondition(AggregateFunction, string, string, SQLOperator, AggregateFunction, string, string)

    Adds a Having condition (of the form t1.c1 Operator t2.c2) to the SQL select statement.

    Declaration
    int AddHavingCondition(AggregateFunction aggregate1, string tableAlias1, string column1, SQLOperator op, AggregateFunction aggregate2, string tableAlias2, string column2)
    Parameters
    Type Name Description
    AggregateFunction aggregate1

    The first AggregateFunction.

    string tableAlias1

    The alias of the table to use in the condition.

    string column1

    The name of the column in tableAlias1 to compare.

    SQLOperator op

    The type of SQL comparison operation.

    AggregateFunction aggregate2

    The second AggregateFunction.

    string tableAlias2

    The alias of the second table to use in the comparison of the condition.

    string column2

    The name of the column in tableAlias2 to compare to tableAlias1.column1.

    Returns
    Type Description
    int

    AddHavingCondition(AggregateFunction, string, string, SQLOperator, string)

    Adds a Having condition (of the form t1.c1 Operator expr) to the SQL select statement.

    Declaration
    int AddHavingCondition(AggregateFunction aggregate1, string tableAlias, string column, SQLOperator op, string expr)
    Parameters
    Type Name Description
    AggregateFunction aggregate1

    The first AggregateFunction.

    string tableAlias

    The alias of the table to use in the condition.

    string column

    The name of the column in tableAlias to compare to the expression.

    SQLOperator op

    The type of SQL comparison operation.

    string expr

    The expression to use in the comparison of the condition.

    Returns
    Type Description
    int

    AddHavingExpression(string)

    Adds any valid Having condition to the SQL select statement.

    Declaration
    int AddHavingExpression(string expr)
    Parameters
    Type Name Description
    string expr

    The SQL having condition.

    Returns
    Type Description
    int

    AddWhereCondition(string, string, SQLOperator, string)

    Adds a Where condition (of the form t1.c1 Operator expr) to the SQL select statement.

    Declaration
    int AddWhereCondition(string tableAlias, string column, SQLOperator op, string expr)
    Parameters
    Type Name Description
    string tableAlias

    The alias of the table to use in the condition.

    string column

    The name of the column in tableAlias to compare to the expression.

    SQLOperator op

    The type of SQL comparison operation.

    string expr

    The expression to use in the comparison of the condition.

    Returns
    Type Description
    int

    AddWhereCondition(string, string, SQLOperator, string, string)

    Adds a Where condition (of the form t1.c1 Operator t2.c2) to the SQL select statement.

    Declaration
    int AddWhereCondition(string tableAlias1, string column1, SQLOperator op, string tableAlias2, string column2)
    Parameters
    Type Name Description
    string tableAlias1

    The alias of the table to use in the condition.

    string column1

    The name of the column in tableAlias1 to compare.

    SQLOperator op

    The type of SQL comparison operation.

    string tableAlias2

    The alias of the second table to use in the comparison of the condition.

    string column2

    The name of the column in tableAlias2 to compare to tableAlias1.column1.

    Returns
    Type Description
    int

    AddWhereExpression(string)

    Adds any valid Where condition to the SQL select statement.

    Declaration
    int AddWhereExpression(string expr)
    Parameters
    Type Name Description
    string expr

    The SQL where condition.

    Returns
    Type Description
    int

    AddWhereIsNotNull(string, string)

    Adds a Where condition (of the form t1.c1 is not null) to the SQL select statement.

    Declaration
    int AddWhereIsNotNull(string tableAlias, string column)
    Parameters
    Type Name Description
    string tableAlias

    The alias of the table to use in the condition.

    string column

    The name of the column in tableAlias to compare to the expression.

    Returns
    Type Description
    int

    AddWhereIsNull(string, string)

    Adds a Where condition (of the form t1.c1 is null) to the SQL select statement.

    Declaration
    int AddWhereIsNull(string tableAlias, string column)
    Parameters
    Type Name Description
    string tableAlias

    The alias of the table to use in the condition.

    string column

    The name of the column in tableAlias to compare to the expression.

    Returns
    Type Description
    int

    AddWhereIsNullCondition(string, string, string, SQLOperator, string)

    Adds a Where condition (of the form IsNull(t1.c1, value) Operator expr) to the SQL select statement.

    Declaration
    int AddWhereIsNullCondition(string tableAlias, string column, string nullValue, SQLOperator op, string expr)
    Parameters
    Type Name Description
    string tableAlias

    The alias of the table to use in the condition.

    string column

    The name of the column in tableAlias to compare to the expression.

    string nullValue

    The value to be used for tableAlias.Column when it is Null in the comparison.

    SQLOperator op

    The type of SQL comparison operation.

    string expr

    The expression to use in the comparison of the condition.

    Returns
    Type Description
    int

    BeginHavingGroup(GroupType)

    Adds the start of a HAVING group.

    Declaration
    void BeginHavingGroup(GroupType group)
    Parameters
    Type Name Description
    GroupType group

    The operator type.

    BeginWhereGroup(GroupType)

    Adds the start of a WHERE group.

    Declaration
    void BeginWhereGroup(GroupType group)
    Parameters
    Type Name Description
    GroupType group

    The operator type.

    EndHavingGroup()

    Ends the last-started HAVING group, created by BeginHavingGroup(GroupType).

    Declaration
    void EndHavingGroup()

    EndWhereGroup()

    Ends the last-started WHERE group, created by BeginWhereGroup(GroupType).

    Declaration
    void EndWhereGroup()

    RemoveTable(string)

    Removes a table from the WHERE and HAVING conditions.

    Declaration
    void RemoveTable(string uniqueAlias)
    Parameters
    Type Name Description
    string uniqueAlias

    The table's alias.

    RemoveWhereCondition(int)

    Removes an entire WHERE condition.

    Declaration
    void RemoveWhereCondition(int uniqueId)
    Parameters
    Type Name Description
    int uniqueId

    ToString()

    Ensures ToString().

    Declaration
    string ToString()
    Returns
    Type Description
    string

    The custom string representation of this object.

    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.