Class SqlQueryBuilder
A Microsoft SQL implementation of the QueryBuilder class.
public class SqlQueryBuilder : QueryBuilder
- Inheritance
-
SqlQueryBuilder
- Inherited Members
Constructors
SqlQueryBuilder()
Initializes a new instance of the SqlQueryBuilder class.
public SqlQueryBuilder()
SqlQueryBuilder(string, IDictionary<string, string>)
Initializes a new instance of the SqlQueryBuilder class.
public SqlQueryBuilder(string tableName, IDictionary<string, string> keyColumns)
Parameters
tableNamestringThe name of the table or view.
keyColumnsIDictionary<string, string>The key columns to be used in this SqlQueryBuilder instance.
SqlQueryBuilder(string, IDictionary<string, string>, IDictionary<string, string>)
Initializes a new instance of the SqlQueryBuilder class.
public SqlQueryBuilder(string tableName, IDictionary<string, string> keyColumns, IDictionary<string, string> columns)
Parameters
tableNamestringThe name of the table or view.
keyColumnsIDictionary<string, string>The key columns to be used in this SqlQueryBuilder instance.
columnsIDictionary<string, string>The none-key columns to be used in this SqlQueryBuilder instance.
Methods
GetQuery(QueryType, string)
Create and returns the query from the specified QueryType.
public override string GetQuery(QueryType queryType, string tableName)
Parameters
queryTypeQueryTypeType of the query to create.
tableNamestringThe name of the table or view. Overrides the class wide tableName.
Returns
- string
The result of the builder as a T-SQL query.