SqlQueryBuilder Object

Overview

The SqlQueryBuilder object provides a concrete implementation of the IQueryBuilder interface defined in UT.

SqlQueryBuilder objects can be used to build SQL query strings compatible with most database engines which support SQL. Differences in the syntax recognized by various database engines is accommodated via the SqlSyntax object.

QueryBuilder objects cannot be created directly, and must be obtained from a Factory. An SqlSyntax object can act as a factory for SqlQueryBuilder objects.

SqlQuery and SqlQueryBuilder objects are not schema-aware, and perform no error checking on the validity of table names and field names used to construct a query.

Raw (unwrapped) SqlQueryBuilder objects are ideal for situations where error checking would "get in the way", such as when writing a code generator which already "knows" which tables and fields to use.

For developing hand-coded queries, it is recommended that a wrapper class be used, which includes schema-aware error checking. The CheckedQuery and CheckedQueryBuilder classes contained in the UMD component are ideal for this purpose.

Properties:

Clone
Limit
QueryType
ToQuery
ToString

Methods:

BuildCriteria
BuildOrdering
BuildSelection
DoCancelInsertOrUpdate
DoClearLimit
DoDeSelect
DoInsertInto
DoIntersect
DoRename
DoSetField
DoSetFieldValue
DoSubtract
DoUnion
DoUpdate
Include

Functions:

MakeExpressionBuilder