C# 클래스 Serenity.Data.SqlUpdate

Generates queries of the form UPDATE tablename SET field1 = value1, field2 = value2 ... fieldN = valueN WHERE [filter].

To determine updated field values, Set(field, value) should be called several times.

Where expressions determines the record(s) to update.

상속: QueryWithParams, ISetFieldByStatement, IFilterableQuery
파일 보기 프로젝트 열기: volkanceylan/Serenity 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( ) : SqlUpdate

Clones this SqlUpdate query.

Dec ( IField field, int value ) : SqlUpdate

Decreases a fields value.

Dec ( string field, int value ) : SqlUpdate

Decreases a fields value.

Format ( string tableName, string where, List nameValuePairs ) : string

Formats an SQL UPDATE statement.

Inc ( IField field, int value ) : SqlUpdate

Increases a fields value.

Inc ( string field, int value ) : SqlUpdate

Increases a fields value.

RemoveT0Reference ( string expression ) : string
SetNull ( string field ) : SqlUpdate

Sets field value to NULL.

SetTo ( IField field, string value ) : SqlUpdate

Sets field value to the expression.

SetTo ( string field, string value ) : SqlUpdate

Sets field value to the expression.

SqlUpdate ( string tableName ) : System

Creates a new SqlUpdate query.

ToString ( ) : string

Gets string representation of SqlUpdate query.

Where ( ) : SqlUpdate

Adds conditions to WHERE clause of the query.

Where ( string condition ) : SqlUpdate

Adds a condition to WHERE clause of the query.

비공개 메소드들

메소드 설명
IFilterableQuery ( string condition ) : void

Adds a condition to WHERE clause of the query.

ISetFieldByStatement ( string field, string value ) : void

Sets field value to the expression.

Initialize ( string tableName ) : void

메소드 상세

Clone() 공개 메소드

Clones this SqlUpdate query.
public Clone ( ) : SqlUpdate
리턴 SqlUpdate

Dec() 공개 메소드

Decreases a fields value.
public Dec ( IField field, int value ) : SqlUpdate
field IField /// Field (required).
value int /// Decrease amount (can be negative).
리턴 SqlUpdate

Dec() 공개 메소드

Decreases a fields value.
public Dec ( string field, int value ) : SqlUpdate
field string /// Field name (required).
value int /// Decrease amount (can be negative).
리턴 SqlUpdate

Format() 공개 정적인 메소드

Formats an SQL UPDATE statement.
public static Format ( string tableName, string where, List nameValuePairs ) : string
tableName string /// Tablename (required).
where string /// WHERE clause (can be null).
nameValuePairs List /// Field name and values. Should have structure of [field1, value1, field2, value2, ...., fieldN, valueN]. /// This array is required and must have even number of elements.
리턴 string

Inc() 공개 메소드

Increases a fields value.
public Inc ( IField field, int value ) : SqlUpdate
field IField /// Field (required).
value int /// Increase amount (can be negative).
리턴 SqlUpdate

Inc() 공개 메소드

Increases a fields value.
public Inc ( string field, int value ) : SqlUpdate
field string /// Field name (required).
value int /// Increase amount (can be negative).
리턴 SqlUpdate

RemoveT0Reference() 공개 정적인 메소드

public static RemoveT0Reference ( string expression ) : string
expression string
리턴 string

SetNull() 공개 메소드

Sets field value to NULL.
public SetNull ( string field ) : SqlUpdate
field string /// Field (required).
리턴 SqlUpdate

SetTo() 공개 메소드

Sets field value to the expression.
public SetTo ( IField field, string value ) : SqlUpdate
field IField /// Field name (required).
value string /// Field expression (required).
리턴 SqlUpdate

SetTo() 공개 메소드

Sets field value to the expression.
public SetTo ( string field, string value ) : SqlUpdate
field string /// Field name (required).
value string /// Field value (expression, required).
리턴 SqlUpdate

SqlUpdate() 공개 메소드

Creates a new SqlUpdate query.
public SqlUpdate ( string tableName ) : System
tableName string /// Tablename (required).
리턴 System

ToString() 공개 메소드

Gets string representation of SqlUpdate query.
public ToString ( ) : string
리턴 string

Where() 공개 메소드

Adds conditions to WHERE clause of the query.
public Where ( ) : SqlUpdate
리턴 SqlUpdate

Where() 공개 메소드

Adds a condition to WHERE clause of the query.
public Where ( string condition ) : SqlUpdate
condition string /// Condition.
리턴 SqlUpdate