Show / Hide Table of Contents

    ISqlQueryBuilder Interface

    .NET Standard 2.x

    Represents an object used to build a SQL SELECT statement.

    The SQL SELECT statement can be used to retrieve rows from the database.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Inherited Constructors

    SnapObjects.Data.ISqlFromBuilder

    SnapObjects.Data.ISqlJoinBuilder

    SnapObjects.Data.ISqlWhereBuilder

    SnapObjects.Data.ISqlGroupBuilder

    SnapObjects.Data.ISqlHavingBuilder

    SnapObjects.Data.ISqlOrderBuilder

    SnapObjects.Data.ISqlBuilder

    SnapObjects.Data.ISqlBuilderBase

    System.ICloneable<ISqlBuilder>

    Syntax

     public interface ISqlQueryBuilder : ISqlFromBuilder, ISqlJoinBuilder, ISqlWhereBuilder, ISqlGroupBuilder, ISqlHavingBuilder, ISqlOrderBuilder, ISqlBuilder, ISqlBuilderBase, ICloneable<ISqlBuilder>;
    

    Method

    Name Return Type Description
    Distinct() ISqlBuilder Adds the DISTINCT keyword to the SELECT clause of the current object. It specifies that only unique rows can appear in the result set.
    Page(int page, int count) ISqlBuilder Specifies that the SQL SELECT statement of the current object only returns the data on the specified page of the paginated result set.
    RemoveSelect(string alias) ISqlQueryBuilder Removes a column (specified by alias) from a selected list.
    ReplaceSelect(string selectRaw) ISqlQueryBuilder Replaces the select list in the SELECT clause with the specified raw SQL.
    Select(ISqlBuilder sqlBuilder) ISqlQueryBuilder Adds a column (which is returned by a subquery specified by an ISqlBuilder object) to the select list of a SELECT clause. It uses the name property of the ISqlBuilder object as the alias for this column by default.
    Select(ISqlBuilder sqlBuilder, string alias) ISqlQueryBuilder Adds a column (which is returned by a subquery specified by an ISqlBuilder object) to the select list of a SELECT clause and specifies an alias for this column.
    Select(string column) ISqlQueryBuilder Adds a column to the select list of a SELECT clause.
    Select(string[] columns) ISqlQueryBuilder Adds multiple columns to the select list of a SELECT clause.
    Select(string column, string alias) ISqlQueryBuilder Adds a column to the select list of a SELECT clause, and specifies an alias for this column.
    SelectRaw(string selectRaw, params ISqlParameter[] parameters) ISqlQueryBuilder Adds a raw SQL to the select list of a SELECT clause.
    SelectRaw(string selectRaw, string builderAlias, params ISqlParameter[] parameters) ISqlQueryBuilder Adds a raw SQL as a column to the select list of a SELECT clause, and specifies an alias for the raw SQL.
    Top(int count) ISqlQueryBuilder Adds the TOP keyword to the SELECT clause of the current object. It specifies that only a certain number of rows will be returned from the result set.
    Union(ISqlQueryBuilder queryBuilder) ISqlQueryBuilder Uses UNION to combine the result set of the current SQL SELECT statement with the result set of another SQL SELECT statement generated by the ISqlQueryBuilder object.
    Union(ISqlQueryBuilder queryBuilder, string builderAlias) ISqlQueryBuilder Uses UNION to combine the result set of the current SQL SELECT statement with the result set of another SQL SELECT statement generated by the ISqlQueryBuilder object; and specifies an alias for the ISqlQueryBuilder object.
    Union(string sqlRaw) ISqlQueryBuilder Uses UNION to combine the result set of the current SQL SELECT statement with the result set of another raw SQL SELECT statement.
    Union(string sqlRaw, string builderAlias) ISqlQueryBuilder Uses UNION to combine the result set of the current SQL SELECT statement with the result set of another raw SQL SELECT statement; and specifies an alias for the raw SQL SELECT statement.
    UnionAll(ISqlQueryBuilder queryBuilder) ISqlQueryBuilder Uses UNION ALL to combine the result set of the current SQL SELECT statement and the result set of another SQL SELECT statement generated by the ISqlQueryBuilder object. The combined result set includes duplicate records.
    UnionAll(ISqlQueryBuilder queryBuilder, string builderAlias) ISqlQueryBuilder Uses UNION ALL to combine the result set of the current SQL SELECT statement and the result set of another SQL SELECT statement generated by the ISqlQueryBuilder object (the combined result set includes duplicate records); and specifies an alias for the ISqlQueryBuilder object.
    UnionAll(string sqlRaw) ISqlQueryBuilder Uses UNION ALL to combine the result set of the current SQL SELECT statement with the result set of another raw SQL SELECT statement. The combined result set includes duplicate records.
    UnionAll(string sqlRaw, string builderAlias) ISqlQueryBuilder Uses UNION ALL to combine the result set of the current SQL SELECT statement with the result set of another raw SQL SELECT statement (the combined result set includes duplicate records); and specifies an alias for the raw SQL SELECT statement.
    Back to top Generated by Appeon