Table of Contents

Class TableSqls

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Represents the full group of DML statements

public class TableSqls
Inheritance
TableSqls
Inherited Members
Extension Methods

Constructors

TableSqls()

Constructor

public TableSqls()

Properties

DeleteRowSql

UPDATE a row statement, e.g. delete from TABLE_NAME where Id = :Id

public string DeleteRowSql { get; set; }

Property Value

string

DeleteSql

DELETE statement, e.g. delete from TABLE_NAME

public string DeleteSql { get; set; }

Property Value

string

DisplayLabels

To be used with SelectSql

A string list, where each string has the format FIELD_NAME=TitleKey.

Determines the visibility of the fields in the drop-down grids: if it is empty then all fields are visible else only the included fields are visible

public Dictionary<string, string> DisplayLabels { get; set; }

Property Value

Dictionary<string, string>

HasDisplayLabels

True if DisplayLabels is not empty

[JsonIgnore]
public bool HasDisplayLabels { get; }

Property Value

bool

InsertRowSql

INSERT a row statement, e.g. insert into TABLE_NAME (FIELD_0, FIELD_N, ...) values (:FIELD_0, :FIELD_N, ...)

public string InsertRowSql { get; set; }

Property Value

string

SelectByMasterIdSql

SELECT statement for a detail table, e.g. select * from TABLE_NAME where FOREIGN_KEY_FIELD = :SomeValue

public string SelectByMasterIdSql { get; set; }

Property Value

string

SelectRowSql

SELECT a row statement, e.g. select * from TABLE_NAME where Id = :Id

public string SelectRowSql { get; set; }

Property Value

string

SelectSql

SELECT statement, e.g. select * from TABLE_NAME

public string SelectSql { get; set; }

Property Value

string

UpdateRowSql

UPDATE a row statement, e.g. update TABLE_NAME set FIELD_= :FIELD_0, FIELD_N = :FIELD_N where Id = :Id

public string UpdateRowSql { get; set; }

Property Value

string

Methods

AssignFrom(TableSqls)

Copies all statements from the specified source

public void AssignFrom(TableSqls Source)

Parameters

Source TableSqls

Clear()

Empties all statements

public void Clear()

LoadFieldTitleKeysFromText(string)

Loads field title keys from a specified text.

NOTE: The specified text must contain string lines separated by NewLine where ecah line contains an equal sign character, e.g. FIELD_NAME=TitleKey.

public void LoadFieldTitleKeysFromText(string Text)

Parameters

Text string