Table of Contents

Class SqlStatementBuilder

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

Generates Sql statements for a DataTable.

public static class SqlStatementBuilder
Inheritance
SqlStatementBuilder
Inherited Members

Methods

BuildSql(string, DataTable, SqlStore, bool)

Generates Sql statements for the Table.

WARNING: Assumes that Table primary key field is named Id.

WARNING: The module name and the table name are used in constructing a unique StatementName.

The StatementName is used with the GetNativeSchemaFromTableName(string, string) so the ModuleName.TableName must construct a unique name because schema DataTables are stored in the SqlCache under that unique name.

public static TableSqls BuildSql(string ModuleName, DataTable Table, SqlStore Store, bool IsTopTable)

Parameters

ModuleName string
Table DataTable
Store SqlStore
IsTopTable bool

Returns

TableSqls

BuildSql(string, string, string, SqlStore, TableSqls, bool)

Generates Sql statements for the Table.

WARNING: The module name and the table name are used in constructing a unique StatementName.

The StatementName is used with the GetNativeSchemaFromTableName(string, string) so the ModuleName.TableName must construct a unique name because schema DataTables are stored in the SqlCache under that unique name.

public static void BuildSql(string ModuleName, string TableName, string PrimaryKeyField, SqlStore Store, TableSqls SqlStatements, bool IsTopTable)

Parameters

ModuleName string
TableName string
PrimaryKeyField string
Store SqlStore
SqlStatements TableSqls
IsTopTable bool

BuildSql(string, MemTable, SqlStore, bool)

Generates Sql statements for the Table.

WARNING: The module name and the table name are used in constructing a unique StatementName.

The StatementName is used with the GetNativeSchemaFromTableName(string, string) so the ModuleName.TableName must construct a unique name because schema DataTables are stored in the SqlCache under that unique name.

public static void BuildSql(string ModuleName, MemTable Table, SqlStore Store, bool IsTopTable)

Parameters

ModuleName string
Table MemTable
Store SqlStore
IsTopTable bool