Sql class

Encapsulates parameterized SQL.

public abstract class Sql

Public Members

name description
static readonly Empty An empty SQL string.
static And(…) Joins the specified SQL fragments with the AND operator.
static Clauses(…) Joins the specified SQL fragments with newlines.
static ColumnNames(…) Returns a comma-delimited list of column names for a DTO of the specified type. (3 methods)
static ColumnNames<T>() Returns a comma-delimited list of column names for a DTO of the specified type.
static ColumnNames<T>(…) Returns a comma-delimited list of column names for a DTO of the specified type. (2 methods)
static ColumnNamesWhere(…) Returns a comma-delimited list of column names for a DTO of the specified type for the properties whose names match the specified filter. (3 methods)
static ColumnNamesWhere<T>(…) Returns a comma-delimited list of column names for a DTO of the specified type for the properties whose names match the specified filter. (3 methods)
static ColumnParams(…) Returns a comma-delimited list of arbitrarily-named parameters for the column values of the specified DTO.
static ColumnParamsWhere(…) Returns a comma-delimited list of arbitrarily-named parameters for the column values of the specified DTO for the properties whose names match the specified filter.
static Concat(…) Concatenates SQL fragments. (2 methods)
static DtoParamNames(…) Returns a comma-delimited list of named parameters for the properties of the specified DTO. (3 methods)
static DtoParamNames<T>() Returns a comma-delimited list of named parameters for the properties of the specified DTO.
static DtoParamNames<T>(…) Returns a comma-delimited list of named parameters for the properties of the specified DTO. (2 methods)
static DtoParamNamesWhere(…) Returns a comma-delimited list of named parameters for the properties of the specified DTO whose names match the specified filter. (3 methods)
static DtoParamNamesWhere<T>(…) Returns a comma-delimited list of named parameters for the properties of the specified DTO whose names match the specified filter. (3 methods)
static Format(…) Creates SQL from a formatted string.
static GroupBy(…) Creates SQL for a GROUP BY clause. If the SQLs are empty, the GROUP BY clause is omitted.
static Having(…) Creates SQL for a HAVING clause. If the SQL is empty, the HAVING clause is omitted.
static Join(…) Joins SQL fragments with the specified separator. (2 methods)
static LikePrefixParam(…) Creates SQL for an arbitrarily-named parameter with the specified fragment of a LIKE pattern followed by a trailing %.
static List(…) Creates SQL for a comma-delimited list of SQL fragments.
static Name(…) Creates SQL for a quoted identifier.
static Or(…) Joins the specified SQL fragments with the OR operator.
static OrderBy(…) Creates SQL for an ORDER BY clause. If the SQLs are empty, the ORDER BY clause is omitted.
static Param(…) Creates SQL for an arbitrarily-named parameter with the specified value.
static ParamList(…) Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values. (2 methods)
static ParamTuple(…) Creates SQL for a comma-delimted list of arbitrarily-named parameters with the specified values, surrounded by parentheses. (2 methods)
static Raw(…) Creates SQL from a raw string.
static Tuple(…) Creates SQL for a comma-delimited list of SQL fragments, surrounded by parentheses.
static Where(…) Creates SQL for a WHERE clause. If the SQL is empty, the WHERE clause is omitted.
operator + Concatenates two SQL fragments.

Protected Members

name description
Sql() The default constructor.

See Also