C# Class Sql.SqlBuilder

Represent a simple SQL Builder
Exibir arquivo Open project: Lordron/WoWHead-data-parser Class Usage Examples

Public Properties

Property Type Description
BuilderSettings Sql.SqlBuilderSettings

Public Methods

Method Description
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

Private Methods

Method Description
AppendQuery ( object key, StringBuilder content ) : void
BuildReplaceInsertQuery ( StringBuilder content ) : void
BuildUpdateQuery ( StringBuilder content ) : void

Method Details

AppendListValues() public method

Append values
public AppendListValues ( IEnumerable values ) : void
values IEnumerable Values
return void

AppendSqlQuery() public method

Append prepared sql query
public AppendSqlQuery ( object key, string format ) : void
key object
format string
return void

AppendValue() public method

Append value
public AppendValue ( object value ) : void
value object Value
return void

AppendValues() public method

Append values
public AppendValues ( ) : void
return void

AppendValues() public method

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
return void

Flush() public method

Flush Sql.SqlBuilder
public Flush ( ) : void
return void

SetKey() public method

Set key
public SetKey ( object key ) : void
key object Key value
return void

Setup() public method

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
return void

Setup() public method

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
return void

SqlBuilder() public method

Initialize Sql.SqlBuilder with specific Sql.SqlBuilderSettings
public SqlBuilder ( ) : System
return System

ToString() public method

Build sql query
public ToString ( ) : string
return string

Property Details

BuilderSettings public_oe property

Gets a Sql.SqlBuilderSettings that contain settings of the current Sql.SqlBuilder
public SqlBuilderSettings,Sql BuilderSettings
return Sql.SqlBuilderSettings