C# Class Serenity.Data.SqlDelete

Class to generate queries of form DELETE FROM tablename WHERE [conditions].
Inheritance: QueryWithParams, IFilterableQuery
Mostrar archivo Open project: volkanceylan/Serenity Class Usage Examples

Public Methods

Method Description
Format ( string tableName, string where ) : string

Formats a DELETE query.

SqlDelete ( string tableName ) : System

Creates a new SqlDelete query.

ToString ( ) : string

Gets string representation of the query.

Where ( ) : SqlDelete

Adds new conditions to the WHERE part of the query with an "AND" between.

Where ( string condition ) : SqlDelete

Adds a new condition to the WHERE part of the query with an "AND" between.

Private Methods

Method Description
IFilterableQuery ( string condition ) : void

Adds a new condition to the WHERE part of the query with an "AND" between.

Initialize ( string tableName ) : void

Method Details

Format() public static method

Formats a DELETE query.
public static Format ( string tableName, string where ) : string
tableName string /// Tablename.
where string /// Where part of the query.
return string

SqlDelete() public method

Creates a new SqlDelete query.
public SqlDelete ( string tableName ) : System
tableName string /// Table to delete records from (required).
return System

ToString() public method

Gets string representation of the query.
public ToString ( ) : string
return string

Where() public method

Adds new conditions to the WHERE part of the query with an "AND" between.
public Where ( ) : SqlDelete
return SqlDelete

Where() public method

Adds a new condition to the WHERE part of the query with an "AND" between.
public Where ( string condition ) : SqlDelete
condition string /// Condition.
return SqlDelete