Skip to content

Table class

Table class represents one table in a Korzh.EasyQuery.Db.DbModel object

public abstract class Korzh.EasyQuery.Db.Table
: IComparable<Table>

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

Assembly: Korzh.EasyQuery.Db.dll

NameTypeDescription
Table()voidDefault constructor of the Korzh.EasyQuery.Db.Table class
Table(Table source)voidDefault constructor of the Korzh.EasyQuery.Db.Table class
NameTypeDescription
ParamsQueryParamListThe list of parameters associated with this table.
NameTypeDescription
AliasstringGets or sets the alias.
CategoryTableCategoryGets or sets the table category.
DBNamestringGets or sets the name of the database.
DesignLayoutstringGets or sets the design layout (left, top and width, height of the table window in Data Model Editor).
ExtraConditionstringGets or sets the extra condition.
FullNamestringGets the full name of the table.
InfoIDictionary<string, object>Stores additional information associated with this entity
LinksTableLinkListGets the links.
PriorityintGets or sets the table’s priority. The default value is 0. The table with the biggest priority (among all tables used in this query) will be placed at beginning of FROM clause in the result SQL.
SchemaNamestringGets or sets the name of the schema.
StoreTableStoreGets the table store of the table.
NameTypeDescription
CompareToTable(Table tbl)intCompares the current table with another table alphabetically.
ComposeAlias(SqlFormats formats)stringComposes the alias.
GetCalcAlias()stringGets the calculated alias (used when the “alias” field is empty)
GetFromExpr(SqlFormats formats)stringGets the full name of the table which is used in FROM clause.
GetPrimalExpr(SqlFormats formats)stringGets the “primal” table expression. Usually it’s the name this table is referenced by in the DB. However, for a virtual table it’s simply its expression.
GetRank()intGets table’s rank. It represents the number of links which come out from this table
GetSqlExpr(SqlFormats formats)stringGets the SQL expression that represents the table in WHERE clause.
GetSqlName(SqlFormats formats)stringGets the name that represents the table in SQL expressions.
GetTableName()stringGets the name of the table.
GetTableTag()stringGets the table Tag (class): DB or virtual.
GetWeight()int
NeedQuote(string s)boolGets a value indicating whether string should be quoted
QuoteIfNecessary(string s, SqlFormats formats)stringPuts quotes around identifier if necessary.
ReadFromJsonAsync(JsonReader reader)TaskReads the content of the table from JSON (asynchronous way).
ReadOnePropFromJsonAsync(JsonReader reader, string propName)TaskReads one table’s property from JSON (asynchronous way).
WritePropertiesToJsonAsync(JsonWriter writer)TaskWrites table’s properties to JSON .
WriteToJsonAsync(JsonWriter writer)TaskWrites table properties to Newtonsoft.Json.JsonWriter object. Calls Korzh.EasyQuery.Db.Table.WritePropertiesToJsonAsync(Newtonsoft.Json.JsonWriter)procedure to do the job (asynchronous way).
NameTypeDescription
CreateByClass(string className)TableCreates Korzh.EasyQuery.Db.Table object the by table class name (db or virtual).