Skip to main content

dbquery-class

Represents query for building SQL command

public class Korzh.EasyQuery.Db.DbQuery
: Query

Assembly: Korzh.EasyQuery.Db.dll

Constructors

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.

Properties

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.

Methods

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, CancellationToken ct)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, CancellationToken ct)TaskSaves content of the query to JSON (asynchronous way).