C# 클래스 BF2Statistics.Database.QueryBuilder.UpdateQueryBuilder

파일 보기 프로젝트 열기: BF2Statistics/ControlCenter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Table string

보호된 프로퍼티들

프로퍼티 타입 설명
Driver DatabaseDriver
Fields FieldValuePair>.Dictionary
WhereStatement WhereStatement

공개 메소드들

메소드 설명
AddWhere ( string field, Comparison @operator, object compareValue ) : WhereClause
AddWhere ( WhereClause Clause ) : void
BuildCommand ( ) : DbCommand

Builds the query string with the current SQL Statement, and returns the DbCommand to be executed. All WHERE paramenters are propery escaped, making this command SQL Injection safe.

BuildQuery ( ) : string

Builds the query string with the current SQL Statement, and returns the querystring. This method is NOT Sql Injection safe!

Execute ( ) : int

Executes the command against the database. The database driver must be set!

SetDbDriver ( DatabaseDriver Driver ) : void

Sets the database driver

SetField ( string Field, object Value ) : void

Sets a value for the specified field

SetField ( string Field, object Value, ValueMode Mode ) : void

Sets a value for the specified field

SetTable ( string Table ) : void

Sets the table name to update

SetWhereOperator ( LogicOperator @Operator ) : void

Sets the Logic Operator for the WHERE statement

UpdateQueryBuilder ( DatabaseDriver Driver ) : System

Creates a new instance of UpdateQueryBuilder with the provided Database Driver.

UpdateQueryBuilder ( string Table, DatabaseDriver Driver ) : System

Creates a new instance of UpdateQueryBuilder with the provided Database Driver.

보호된 메소드들

메소드 설명
BuildQuery ( bool BuildCommand ) : object

Builds the query string or DbCommand

GetSign ( ValueMode Mode ) : string

Returns the sign for the given value mode

메소드 상세

AddWhere() 공개 메소드

public AddWhere ( string field, Comparison @operator, object compareValue ) : WhereClause
field string
@operator Comparison
compareValue object
리턴 WhereClause

AddWhere() 공개 메소드

public AddWhere ( WhereClause Clause ) : void
Clause WhereClause
리턴 void

BuildCommand() 공개 메소드

Builds the query string with the current SQL Statement, and returns the DbCommand to be executed. All WHERE paramenters are propery escaped, making this command SQL Injection safe.
public BuildCommand ( ) : DbCommand
리턴 System.Data.Common.DbCommand

BuildQuery() 보호된 메소드

Builds the query string or DbCommand
protected BuildQuery ( bool BuildCommand ) : object
BuildCommand bool
리턴 object

BuildQuery() 공개 메소드

Builds the query string with the current SQL Statement, and returns the querystring. This method is NOT Sql Injection safe!
public BuildQuery ( ) : string
리턴 string

Execute() 공개 메소드

Executes the command against the database. The database driver must be set!
public Execute ( ) : int
리턴 int

GetSign() 보호된 메소드

Returns the sign for the given value mode
protected GetSign ( ValueMode Mode ) : string
Mode ValueMode
리턴 string

SetDbDriver() 공개 메소드

Sets the database driver
public SetDbDriver ( DatabaseDriver Driver ) : void
Driver DatabaseDriver
리턴 void

SetField() 공개 메소드

Sets a value for the specified field
public SetField ( string Field, object Value ) : void
Field string The column or field name
Value object The new value to update
리턴 void

SetField() 공개 메소드

Sets a value for the specified field
public SetField ( string Field, object Value, ValueMode Mode ) : void
Field string The column or field name
Value object The new value to update
Mode ValueMode Sets how the update value will be applied to the existing field value
리턴 void

SetTable() 공개 메소드

Sets the table name to update
public SetTable ( string Table ) : void
Table string The name of the table to update
리턴 void

SetWhereOperator() 공개 메소드

Sets the Logic Operator for the WHERE statement
public SetWhereOperator ( LogicOperator @Operator ) : void
@Operator LogicOperator
리턴 void

UpdateQueryBuilder() 공개 메소드

Creates a new instance of UpdateQueryBuilder with the provided Database Driver.
public UpdateQueryBuilder ( DatabaseDriver Driver ) : System
Driver DatabaseDriver The DatabaseDriver that will be used to query this SQL statement
리턴 System

UpdateQueryBuilder() 공개 메소드

Creates a new instance of UpdateQueryBuilder with the provided Database Driver.
public UpdateQueryBuilder ( string Table, DatabaseDriver Driver ) : System
Table string The table we are updating
Driver DatabaseDriver The DatabaseDriver that will be used to query this SQL statement
리턴 System

프로퍼티 상세

Driver 보호되어 있는 프로퍼티

The database driver, if using the "BuildCommand" method
protected DatabaseDriver Driver
리턴 DatabaseDriver

Fields 보호되어 있는 프로퍼티

A list of FieldValuePairs
protected Dictionary Fields
리턴 FieldValuePair>.Dictionary

Table 공개적으로 프로퍼티

The table name to query
public string Table
리턴 string

WhereStatement 보호되어 있는 프로퍼티

Query's where statement
protected WhereStatement WhereStatement
리턴 WhereStatement