minor cleanup

This commit is contained in:
John Estropia
2017-07-04 12:21:46 +09:00
committed by John Rommel Estropia
parent f62137fb58
commit f5e1643ef7
+10 -18
View File
@@ -50,13 +50,11 @@ public struct Where<D: DynamicObject>: WhereClause, FetchClause, QueryClause, De
*/
public static func && (left: Where, right: Where?) -> Where {
if right != nil {
return left && right!
}
else {
if let right = right {
return left
return left && right
}
return left
}
/**
@@ -67,14 +65,12 @@ public struct Where<D: DynamicObject>: WhereClause, FetchClause, QueryClause, De
*/
public static func && (left: Where?, right: Where) -> Where {
if left != nil {
if let left = left {
return left && right
}
else {
return right
}
}
/**
Combines two `Where` predicates together using `OR` operator
@@ -92,13 +88,11 @@ public struct Where<D: DynamicObject>: WhereClause, FetchClause, QueryClause, De
*/
public static func || (left: Where, right: Where?) -> Where {
if right != nil {
return left || right!
}
else {
if let right = right {
return left
return left || right
}
return left
}
/**
@@ -109,14 +103,12 @@ public struct Where<D: DynamicObject>: WhereClause, FetchClause, QueryClause, De
*/
public static func || (left: Where?, right: Where) -> Where {
if left != nil {
if let left = left {
return left || right
}
else {
return right
}
}
/**
Inverts the predicate of a `Where` clause using `NOT` operator