Skip to main content

virtualtable-class

Represents a virtual table. Virtual tables do not correpond to some table in database but are defined through some SQL SELECT statement instead.

public class Korzh.EasyQuery.Db.VirtualTable
: Table

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
VirtualTable()voidInitializes a new instance of the VirtualTable class.

Properties

NameTypeDescription
ExprstringGets or sets the expression.

Methods

NameTypeDescription
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.
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.
GetTableTag()stringGets the table class (DB or virtual).
ReadOnePropFromJsonAsync(JsonReader reader, string propName, CancellationToken ct)TaskReads one table's property from JSON (asynchronous way).
WritePropertiesToJsonAsync(JsonWriter writer, CancellationToken ct)TaskWrites the content of VirtualTable object to JSON (asynchronous way).