Skip to main content

table-class

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

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

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
Table()voidDefault constructor of the Korzh.EasyQuery.Db.Table class
Table(Table source)voidDefault constructor of the Korzh.EasyQuery.Db.Table class

Fields

NameTypeDescription
ParamsQueryParamListThe list of parameters associated with this table.

Properties

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.

Methods

NameTypeDescription
CompareToTable(Table tbl)intCompares the current table with another table alphabetically.
ComposeAlias(SqlFormats formats)stringComposes the alias.
GetFromExpr(SqlFormats formats)stringGets the full name of the table which is used in FROM clause.
GetFullName(bool includeDbName)stringGets the full name of the table.
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
GetSchemaName()stringGets the schema of the 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, CancellationToken ct = null)TaskReads the content of the table from JSON (asynchronous way).
ReadOnePropFromJsonAsync(JsonReader reader, string propName, CancellationToken ct)TaskReads one table's property from JSON (asynchronous way).
ToString()stringReturns a that represents the current .
WritePropertiesToJsonAsync(JsonWriter writer, CancellationToken ct)TaskWrites table's properties to JSON .
WriteToJsonAsync(JsonWriter writer, CancellationToken ct = null)TaskWrites table properties to Newtonsoft.Json.JsonWriter object. Calls Korzh.EasyQuery.Db.Table.WritePropertiesToJsonAsync(Newtonsoft.Json.JsonWriter,System.Threading.CancellationToken)procedure to do the job (asynchronous way).

Static Methods

NameTypeDescription
CreateByClass(string className)TableCreates Korzh.EasyQuery.Db.Table object the by table class name (db or virtual).