MySqlCmdBuilder

This class is a helper that aids in the construction of SQL statements based on Statements objects and can be used as a base class for those that implements specific funcionality.

Namespace:
KpokPatagon.Data.MySql
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
Yes

Constructors

MySqlCmdBuilder

Creates a new instance of MySqlCmdBuilder.

Signature:
public Void MySqlCmdBuilder(commandBuilder)
Parameters
Name Type Summary
commandBuilder IDbCmdBuilder A IDbCmdBuilder that handles the building of the SQL command.

Methods

BuildColumnWithOrWithoutAlias

Builds a column with or without the alias.

Signature:
protected Void BuildColumnWithOrWithoutAlias(builder, repository, columnName, useAlias)
Parameters
Name Type Summary
builder StringBuilder
repository Repository
columnName String
useAlias Boolean

BuildPredicate

Builds a the predicate.

Signature:
protected Void BuildPredicate(statement, command, builder, predicate)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
predicate Object

BuildPredicate

Builds a between predicate.

Signature:
protected Void BuildPredicate(statement, command, builder, predicate)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
predicate BetweenPredicate

BuildPredicate

Builds a decorated column predicate.

Signature:
protected Void BuildPredicate(statement, command, builder, predicate)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
predicate DecoratedPredicate

BuildPredicate

Builds an exists predicate

Signature:
protected Void BuildPredicate(statement, command, builder, predicate)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
predicate ExistsPredicate

BuildPredicate

Builds a simple predicate.

Signature:
protected Void BuildPredicate(statement, command, builder, predicate)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
predicate SimplePredicate
Exceptions
Type Summary
InvalidSimplePredicateValueException Thown when the predicate value is not valid
QueryBuilderException Thown when the BuildPredicate cannot be constructed.

BuildSearchCondition

Builds a search condition.

Signature:
protected Void BuildSearchCondition(statement, command, builder, search)
Parameters
Name Type Summary
statement TStatement
command IDbCommand
builder StringBuilder
search SearchCondition

GetDbTypeForCast

Gets the database type for casting information.

Signature:
protected String GetDbTypeForCast(type)
Parameters
Name Type Summary
type DbType