QueryBuilder Class
Definition
An abstract class for building T-SQL statements from table and columns definitions.
public abstract class QueryBuilder
- Inheritance
-
QueryBuilder
- Derived
Constructors
| Name | Description |
|---|---|
| QueryBuilder() | Initializes a new instance of the QueryBuilder class. |
| QueryBuilder(string, IDictionary<string, string>) | Initializes a new instance of the QueryBuilder class. |
| QueryBuilder(string, IDictionary<string, string>, IDictionary<string, string>) | Initializes a new instance of the QueryBuilder class. |
Properties
| Name | Description |
|---|---|
| Columns | Gets the none-key columns to be used in the QueryBuilder instance. |
| EnableDirtyReads | Gets or sets a value indicating whether the data source should try to prevent locking from readonly queries. |
| 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. |
| EnableTableAndColumnEncapsulation | Gets or sets a value indicating whether an encapsulation should be committed automatically on table and column names. |
| KeyColumns | Gets the key columns to be used in the QueryBuilder instance. |
| ReadLimit | Gets or sets a value limiting the maximum amount of records that can be retrieved from a repository. Default is 1000. |
| TableName | Gets or sets the name of the table or view. |
Methods
| Name | Description |
|---|---|
| Append(string) | Appends the specified query fragment to the end of this instance. |
| Append(string, params 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. |
| EncodeFragment(QueryFormat, IEnumerable<string>, bool) | Encodes the specified sequence of |
| GetQuery(QueryType) | Create and returns the query from the specified QueryType. |
| GetQuery(QueryType, string) | Create and returns the builded query from the specified QueryType. |
| ToString() |