Skip to content

DbQuery class

Represents query for building SQL command

public class Korzh.EasyQuery.Db.DbQuery
: Query

Package: Korzh.EasyQuery.Db (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.Db.dll

NameTypeDescription
DbQuery(DataModel model, Query parentQuery)voidInitializes a new instance of the Korzh.EasyQuery.Db.DbQuery class.
DbQuery(DataModel model)voidInitializes a new instance of the Korzh.EasyQuery.Db.DbQuery class.
NameTypeDescription
ExtraTablesTableListGets 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
OptionsSqlExtrasGets the Korzh.EasyQuery.Db.SqlExtras object which defines some extra clauses of generated query.
ResultColumnsIEnumerable<QueryColumn>Gets 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).
NameTypeDescription
CheckModelObject(DataModel model)voidChecks if model object has appropriate type and raise exception if not
CoreClear()voidClears all query content. Can be overriden in derived classes.
CreateColumn(IColumnDescriptor& modreq(System.Runtime.InteropServices.InAttribute) desc)QueryColumnCreates a column by its descriptor
CreateParentEntityAttrExpr(EntityAttr attr)EntityAttrExprCreates the parent entity attribute expression.
CreateQueryExpr()EqExpressionCreates a sub-query expression.
CreateSubQuery()QueryCreates the subquery.
GetParentQueryRootEntity()EntityGets the entities from parent query.
GetUsedEntities()List<Entity>Gets the list of used entities.
GetUsedTables()TableListGets the used tables.
LoadNode(XmlReader reader, BitOptions rwOptions)voidLoads the root node.
NewModel()DataModelCreates a new model (an object of DataModel class or its descendant).
ReadOnePropFromJsonAsync(JsonReader reader, string propName, BitOptions rwOptions)TaskReads the property from JSON reader or skip unused (asynchronous way).
SaveNodes(XmlWriter writer, BitOptions rwOptions)voidSaves the root nodes.
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions rwOptions)TaskSaves content of the query to JSON (asynchronous way).