C# Класс Sql.SqlBuilder

Represent a simple SQL Builder
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
BuilderSettings Sql.SqlBuilderSettings

Открытые методы

Метод Описание
AppendListValues ( IEnumerable values ) : void

Append values

AppendSqlQuery ( object key, string format ) : void

Append prepared sql query

AppendValue ( object value ) : void

Append value

AppendValues ( ) : void

Append values

AppendValues ( IEnumerable values, int count ) : void

Append values

Flush ( ) : void

Flush Sql.SqlBuilder

SetKey ( object key ) : void

Set key

Setup ( string tableName, string key, bool hasPreparedQueries ) : void

Setup Sql.SqlBuilder

Setup ( string tableName, string key, bool hasPreparedQueries, string fields, int count ) : void

Setup Sql.SqlBuilder

SqlBuilder ( ) : System

Initialize Sql.SqlBuilder with specific Sql.SqlBuilderSettings

ToString ( ) : string

Build sql query

Приватные методы

Метод Описание
AppendQuery ( object key, StringBuilder content ) : void
BuildReplaceInsertQuery ( StringBuilder content ) : void
BuildUpdateQuery ( StringBuilder content ) : void

Описание методов

AppendListValues() публичный Метод

Append values
public AppendListValues ( IEnumerable values ) : void
values IEnumerable Values
Результат void

AppendSqlQuery() публичный Метод

Append prepared sql query
public AppendSqlQuery ( object key, string format ) : void
key object
format string
Результат void

AppendValue() публичный Метод

Append value
public AppendValue ( object value ) : void
value object Value
Результат void

AppendValues() публичный Метод

Append values
public AppendValues ( ) : void
Результат void

AppendValues() публичный Метод

Append values
public AppendValues ( IEnumerable values, int count ) : void
values IEnumerable Values
count int A specified mumber of contiguous elements from the start of a sequance
Результат void

Flush() публичный Метод

Flush Sql.SqlBuilder
public Flush ( ) : void
Результат void

SetKey() публичный Метод

Set key
public SetKey ( object key ) : void
key object Key value
Результат void

Setup() публичный Метод

Setup Sql.SqlBuilder
public Setup ( string tableName, string key, bool hasPreparedQueries ) : void
tableName string Table name (like creature_template, creature etc.)
key string Key name from table
hasPreparedQueries bool Value indicating whether to create a query storage/param> /// Fields name
Результат void

Setup() публичный Метод

Setup Sql.SqlBuilder
public Setup ( string tableName, string key, bool hasPreparedQueries, string fields, int count ) : void
tableName string Table name (like creature_template, creature etc.)
key string Key name from table
hasPreparedQueries bool Value indicating whether to create a query storage/param> /// A specified mumber of contiguous elements from the start of a sequance
fields string Sequance
count int
Результат void

SqlBuilder() публичный Метод

Initialize Sql.SqlBuilder with specific Sql.SqlBuilderSettings
public SqlBuilder ( ) : System
Результат System

ToString() публичный Метод

Build sql query
public ToString ( ) : string
Результат string

Описание свойств

BuilderSettings публичное свойство

Gets a Sql.SqlBuilderSettings that contain settings of the current Sql.SqlBuilder
public SqlBuilderSettings,Sql BuilderSettings
Результат Sql.SqlBuilderSettings