mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-25 04:07:47 +00:00
SQLRequestExpressible is a sub protocol of SQLSpecificExpressible
This commit is contained in:
1 parent
69641ff7d6
commit
be249bc697
5 files changed
+23
-103
No files matched your search
@@ -116,22 +116,6 @@ public func == (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQL
|
||||
isEqual(lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func == (lhs: SQLExpressible?, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs == rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func == (lhs: SQLRequestExpressible, rhs: SQLExpressible?) -> SQLExpression {
|
||||
lhs.sqlExpression == rhs
|
||||
}
|
||||
|
||||
public func == (lhs: Bool, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs == rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func == (lhs: SQLRequestExpressible, rhs: Bool) -> SQLExpression {
|
||||
lhs.sqlExpression == rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `<>` SQL operator.
|
||||
///
|
||||
/// // name <> 'Arthur'
|
||||
@@ -226,22 +210,6 @@ public func != (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQL
|
||||
isEqual(lhs.sqlExpression, rhs.sqlExpression).negated
|
||||
}
|
||||
|
||||
public func != (lhs: SQLExpressible?, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs != rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func != (lhs: SQLRequestExpressible, rhs: SQLExpressible?) -> SQLExpression {
|
||||
lhs.sqlExpression != rhs
|
||||
}
|
||||
|
||||
public func != (lhs: Bool, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs != rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func != (lhs: SQLRequestExpressible, rhs: Bool) -> SQLExpression {
|
||||
lhs.sqlExpression == rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `IS` SQL operator.
|
||||
///
|
||||
/// // name IS 'Arthur'
|
||||
@@ -286,14 +254,6 @@ public func === (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQ
|
||||
SQLExpressionEqual(.is, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func === (lhs: SQLExpressible?, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs === rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func === (lhs: SQLRequestExpressible, rhs: SQLExpressible?) -> SQLExpression {
|
||||
lhs.sqlExpression === rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `IS NOT` SQL operator.
|
||||
///
|
||||
/// // name IS NOT 'Arthur'
|
||||
@@ -338,15 +298,6 @@ public func !== (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQ
|
||||
SQLExpressionEqual(.isNot, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func !== (lhs: SQLExpressible, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs !== rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func !== (lhs: SQLRequestExpressible, rhs: SQLExpressible) -> SQLExpression {
|
||||
lhs.sqlExpression !== rhs
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Comparison Operators (<, >, <=, >=)
|
||||
|
||||
extension SQLBinaryOperator {
|
||||
@@ -403,14 +354,6 @@ public func < (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQLE
|
||||
SQLExpressionBinary(.lessThan, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func < (lhs: SQLExpressible, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs < rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func < (lhs: SQLRequestExpressible, rhs: SQLExpressible) -> SQLExpression {
|
||||
lhs.sqlExpression < rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `<=` SQL operator.
|
||||
///
|
||||
/// // score <= 18
|
||||
@@ -451,14 +394,6 @@ public func <= (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQL
|
||||
SQLExpressionBinary(.lessThanOrEqual, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func <= (lhs: SQLExpressible, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs <= rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func <= (lhs: SQLRequestExpressible, rhs: SQLExpressible) -> SQLExpression {
|
||||
lhs.sqlExpression <= rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `>` SQL operator.
|
||||
///
|
||||
/// // score > 18
|
||||
@@ -499,14 +434,6 @@ public func > (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQLE
|
||||
SQLExpressionBinary(.greaterThan, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func > (lhs: SQLExpressible, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs > rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func > (lhs: SQLRequestExpressible, rhs: SQLExpressible) -> SQLExpression {
|
||||
lhs.sqlExpression > rhs
|
||||
}
|
||||
|
||||
/// An SQL expression that compares two expressions with the `>=` SQL operator.
|
||||
///
|
||||
/// // score >= 18
|
||||
@@ -547,15 +474,6 @@ public func >= (lhs: SQLSpecificExpressible, rhs: SQLSpecificExpressible) -> SQL
|
||||
SQLExpressionBinary(.greaterThanOrEqual, lhs.sqlExpression, rhs.sqlExpression)
|
||||
}
|
||||
|
||||
public func >= (lhs: SQLExpressible, rhs: SQLRequestExpressible) -> SQLExpression {
|
||||
lhs >= rhs.sqlExpression
|
||||
}
|
||||
|
||||
public func >= (lhs: SQLRequestExpressible, rhs: SQLExpressible) -> SQLExpression {
|
||||
lhs.sqlExpression >= rhs
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Inclusion Operators (BETWEEN, IN)
|
||||
|
||||
extension Range where Bound: SQLExpressible {
|
||||
|
||||
Reference in new issue
Block a user