ConditionalClause
public protocol ConditionalClause : Buildable
A protocol for conditions used in SQL WHERE, ON and HAVING clauses.
-
The type of the column expression used in the clause: either
ScalarColumnExpression
orAggregateColumnExpression
.Declaration
Swift
associatedtype ColumnExpressionType : Field
-
The left hand side of the conditional clause.
Declaration
Swift
var lhs: Predicate<ClauseType, ColumnExpressionType>? { get }
-
The right hand side of the conditional clause.
Declaration
Swift
var rhs: Predicate<ClauseType, ColumnExpressionType>? { get }
-
The operator of the conditional clause.
Declaration
Swift
var condition: Condition { get }
-
build(queryBuilder:
Default implementation) Build the clause using
QueryBuilder
.Throws
QueryError.syntaxError if query build fails.Default Implementation
Build the clause using
QueryBuilder
.Throws
QueryError.syntaxError if query build fails.Declaration
Swift
func build(queryBuilder: QueryBuilder) throws -> String
Parameters
queryBuilder
The QueryBuilder to use.
Return Value
A String representation of the clause.