Skip to main content

tablelink-class

Represents link between two tables

public class Korzh.EasyQuery.Db.TableLink

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
TableLink()voidInitializes a new instance of the Korzh.EasyQuery.Db.TableLink class.

Properties

NameTypeDescription
ConditionExprstringGets or sets the expression of link condition. This expression will be used if Korzh.EasyQuery.Db.TableLink.Conditions list is empty.
ConditionsTableLink.ConditionListGets list of linking conditions.
IsEnabledboolDetermines whether the link can be used on query building.
IsObligatoryboolGets or sets a value indicating whether this link is obligatory. It means that if two tables participate in a query then this link will be added in any case even if these 2 tables are already joined to some other tables.
LinkTypeTableLinkTypeGets or sets the type of the link (inner, left, right or full).
LnkTypeTableLinkType
ModelDbModel
QuoteFieldsboolGets or sets a value indicating whether field names in link conditions should be quoted in SQL expressions.
Table1TableGets or sets the first table of the link.
Table2TableGets or sets the second table of the link.
UseHashboolGets or sets value indicating wether database should use hash join algorithm (experimental feature)

Methods

NameTypeDescription
AddCondition(LinkCondType condType, string expr1, string expr2, string operation)TableLink.ConditionAdds the link condition by two expressions and operation.
ContainsTable(Table table)boolReturns true if the table passed in parameter participates in this link
CopyFrom(TableLink link)TableLinkCopy information from other link
GetSqlExpr(SqlFormats formats)stringGets the SQL expression of the link
SwitchTables(bool changeLinkTypeAccordingly = False)voidSwitches the tables that participate in the link. Table1 become Table2 and vice versa. So, the default direction of the link is changed.
ToString()stringReturns a that represents the current .

Static Methods

NameTypeDescription
StrToLinkType(string s)TableLinkTypeConverts text to Korzh.EasyQuery.Db.TableLinkType value.