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.
Creates a new instance of MySqlCmdBuilder.
public Void MySqlCmdBuilder(commandBuilder)
Name | Type | Summary |
---|---|---|
commandBuilder | IDbCmdBuilder | A IDbCmdBuilder that handles the building of the SQL command. |
Builds a column with or without the alias.
protected Void BuildColumnWithOrWithoutAlias(builder, repository, columnName, useAlias)
Name | Type | Summary |
---|---|---|
builder | StringBuilder | |
repository | Repository | |
columnName | String | |
useAlias | Boolean |
Builds a the predicate.
protected Void BuildPredicate(statement, command, builder, predicate)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
predicate | Object |
Builds a between predicate.
protected Void BuildPredicate(statement, command, builder, predicate)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
predicate | BetweenPredicate |
Builds a decorated column predicate.
protected Void BuildPredicate(statement, command, builder, predicate)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
predicate | DecoratedPredicate |
Builds an exists predicate
protected Void BuildPredicate(statement, command, builder, predicate)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
predicate | ExistsPredicate |
Builds a simple predicate.
protected Void BuildPredicate(statement, command, builder, predicate)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
predicate | SimplePredicate |
Type | Summary |
---|---|
InvalidSimplePredicateValueException | Thown when the predicate value is not valid |
QueryBuilderException | Thown when the BuildPredicate cannot be constructed. |
Builds a search condition.
protected Void BuildSearchCondition(statement, command, builder, search)
Name | Type | Summary |
---|---|---|
statement | TStatement | |
command | IDbCommand | |
builder | StringBuilder | |
search | SearchCondition |
Gets the database type for casting information.
protected String GetDbTypeForCast(type)
Name | Type | Summary |
---|---|---|
type | DbType |