Show / Hide Table of Contents

    Class QueryBuilder

    An abstract class for building T-SQL statements from table and columns definitions.

    Inheritance
    System.Object
    QueryBuilder
    SqlQueryBuilder
    Namespace: Cuemon.Data
    Assembly: Cuemon.Data.dll
    Syntax
    public abstract class QueryBuilder

    Constructors

    | Improve this Doc

    QueryBuilder()

    Initializes a new instance of the QueryBuilder class.

    Declaration
    protected QueryBuilder()
    | Improve this Doc

    QueryBuilder(String, IDictionary<String, String>)

    Initializes a new instance of the QueryBuilder class.

    Declaration
    protected QueryBuilder(string tableName, IDictionary<string, string> keyColumns)
    Parameters
    Type Name Description
    System.String tableName

    The name of the table or view.

    System.Collections.Generic.IDictionary<System.String, System.String> keyColumns

    The key columns to be used in this QueryBuilder instance.

    | Improve this Doc

    QueryBuilder(String, IDictionary<String, String>, IDictionary<String, String>)

    Initializes a new instance of the QueryBuilder class.

    Declaration
    protected QueryBuilder(string tableName, IDictionary<string, string> keyColumns, IDictionary<string, string> columns)
    Parameters
    Type Name Description
    System.String tableName

    The name of the table or view.

    System.Collections.Generic.IDictionary<System.String, System.String> keyColumns

    The key columns to be used in this QueryBuilder instance.

    System.Collections.Generic.IDictionary<System.String, System.String> columns

    The none-key columns to be used in this QueryBuilder instance.

    Properties

    | Improve this Doc

    Columns

    Gets the none-key columns to be used in the QueryBuilder instance.

    Declaration
    public IDictionary<string, string> Columns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>

    The none-key columns to be used in the QueryBuilder instance.

    | Improve this Doc

    EnableDirtyReads

    Gets or sets a value indicating whether the data source should try to prevent locking from readonly queries.

    Declaration
    public bool EnableDirtyReads { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the data source should try to prevent locking from readonly queries; otherwise, false.

    | Improve this Doc

    EnableReadLimit

    Gets or sets a value indicating whether a query is restricted in how many records (ReadLimit) can be retrieved from a repository. Default is false.

    Declaration
    public bool EnableReadLimit { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if a query is restricted in how many records (ReadLimit) can be retrieved from a repository; otherwise, false.

    | Improve this Doc

    EnableTableAndColumnEncapsulation

    Gets or sets a value indicating whether an encapsulation should be committed automatically on table and column names.

    Declaration
    public bool EnableTableAndColumnEncapsulation { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if an encapsulation should be committed automatically on table and column names; otherwise, false.

    | Improve this Doc

    KeyColumns

    Gets the key columns to be used in the QueryBuilder instance.

    Declaration
    public IDictionary<string, string> KeyColumns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>

    The key columns to be used in the QueryBuilder instance.

    | Improve this Doc

    ReadLimit

    Gets or sets a value limiting the maximum amount of records that can be retreived from a repository. Default is 1000.

    Declaration
    public int ReadLimit { get; set; }
    Property Value
    Type Description
    System.Int32

    The maximum amount of records that can be retreived from a repository.

    | Improve this Doc

    TableName

    Gets or sets the name of the table or view.

    Declaration
    public string TableName { get; set; }
    Property Value
    Type Description
    System.String

    The name of the table or view.

    Methods

    | Improve this Doc

    Append(String)

    Appends the specified query fragment to the end of this instance.

    Declaration
    protected void Append(string queryFragment)
    Parameters
    Type Name Description
    System.String queryFragment

    The query fragment to append.

    | Improve this Doc

    Append(String, Object[])

    Appends a formatted query fragment, which contains zero or more format specifications, to the end of this instance. Each format specification is replaced by the string representation of a corresponding object argument.

    Declaration
    protected void Append(string queryFragment, params object[] args)
    Parameters
    Type Name Description
    System.String queryFragment

    The query fragment to append.

    System.Object[] args

    An array of objects to format.

    | Improve this Doc

    GetQuery(QueryType)

    Create and returns the builded query from the specified QueryType.

    Declaration
    public string GetQuery(QueryType queryType)
    Parameters
    Type Name Description
    QueryType queryType

    Type of the query to create.

    Returns
    Type Description
    System.String

    The builded T-SQL query.

    | Improve this Doc

    GetQuery(QueryType, String)

    Create and returns the builded query from the specified QueryType.

    Declaration
    public abstract string GetQuery(QueryType queryType, string tableName)
    Parameters
    Type Name Description
    QueryType queryType

    Type of the query to create.

    System.String tableName

    The name of the table or view. Overrides the class wide tableName.

    Returns
    Type Description
    System.String
    | Improve this Doc

    ToString()

    Returns a System.String that represents the current System.Object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents the current System.Object.

    Overrides
    System.Object.ToString()

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX