Skip to content

BaseQueryBuilder class

Base class for all query builder classes like .

public abstract class Korzh.EasyQuery.BaseQueryBuilder
: IQueryBuilder
TypeNameDescription
StringcondFieldNameThe name of the field in currently processing condition (used for generation of parameter names)
BooleanparamModeThis property indicated whethere generated SQL should include parameters instead of real values.
TypeNameDescription
QueryFormatsFormatsGets the formats of generated query statement. This is a structure which allows you to set different formatting option of generated SQL (or other query language) statements. For more information please read Korzh.EasyQuery.QueryFormats reference.
DataModelModelGets the model. An instance of Korzh.EasyQuery.DataModel class or one of its descendants (for example DbModel)
QueryQueryGets the query object associated with the builder.
TypeResultTypeGets the the result type.
TypeNameDescription
StringCalcScalarExpr(Condition cnd, String value, DataType dataType, ScalarExprOptions exprOptions)Calculates the scalar value and returns SQL (or other query language) expression. This function replaces all macros with their real values first and then call Korzh.EasyQuery.BaseQueryBuilder.ProcessScalarValue(Korzh.EasyQuery.Condition,System.String,Korzh.EasyQuery.DataType,Korzh.EasyQuery.ScalarExprOptions) method to get the result.
QueryFormatsCreateQueryFormats()Creates Korzh.EasyQuery.QueryFormats object compatible with this type of query builder. Should be overriden in descendant classes
QueryBuilderResultCreateResult()Creates the result object.
StringGetParamExpr(String id)Gets the parameter expression.
QueryBuilderResultGetResult()
voidProcessDefaultMacros(StringBuilder sb, Boolean quoting = False)Processes the default macros such as ${Today}, ${True} and others.
voidProcessMacros(Condition cnd, StringBuilder sb, DataType dataType, Boolean quoting = False)Processes the macro values (both user-defined and default)
StringProcessScalarValue(Condition cnd, String value, DataType dataType, ScalarExprOptions exprOptions)Processes the scalar value and returns SQL (or other query language) expression.
StringToString()Returns a System.String that represents this instance.