Skip to content

DbQuery class

Represents query for building SQL command

public class Korzh.EasyQuery.Db.DbQuery
: Query
TypeNameDescription
TableListExtraTablesGets the list of “extra” tables (the tables which will be included into result query by user request).
NoPathResolutionNoPathResolutionGet or set the type of reaction for the situation when two tables have no path between them
SqlExtraClausesOptionsGets the Korzh.EasyQuery.Db.SqlExtraClauses object which defines some extra clauses of generated query.
IEnumerable<Column>ResultColumnsGets the full list of columns which will be returned in result query. It equals to Columns list if it’s not empty. Otherwise - it’s an array of all fields from all tables taking part in this query (like SELECT * in SQL).
TypeNameDescription
CondSqlGenEventHandlerCondSqlGenThis event is raised during query building for each condition in the query and it allows you to replace the SQL expression generated for this condition.
TypeNameDescription
voidCheckModelObject(DataModel model)Checks if model object has appropriate type and raise exception if not
voidCoreClear()Clears all query content. Can be overriden in derived classes.
AggrFuncExprCreateAggrFuncExpr(DataModel model, String funcID, EqExpression argExpr)Creates the aggregate function expression.
ColumnCreateColumn()Creates the column.
EntityAttrExprCreateEntityAttrExpr(DataModel model, EntityAttr attr)Creates the entity attribute expression.
QueryFormatsCreateFormats()Gets the formats of generated query language (SQL or other).
EntityAttrExprCreateParentEntityAttrExpr(DataModel model, EntityAttr attr)Creates the parent entity attribute expression.
PredicateCreatePredicate()Creates a new predicate.
SimpleConditionCreateSimpleCondition()Creates the simple condition.
QueryCreateSubQuery()Creates the subquery.
EntityGetParentQueryRootEntity()Gets the entities from parent query.
List<DbEntity>GetUsedEntities()Gets the list of used entities.
TableListGetUsedTables()Gets the used tables.
voidLoadNode(XmlReader reader, RWOptions rwOptions)Loads the root node.
DataModelNewModel()Creates a new model (an object of DataModel class or its descendant).
BooleanOnCondSqlGen(CondSqlGenEventArgs e)Raises the CondSqlGen event.
voidSaveNodes(XmlWriter writer, RWOptions rwOptions)Saves the root nodes.