add Where initializer that can accept another Where clause

This commit is contained in:
John Estropia
2019-01-28 20:10:15 +09:00
parent 9425cb56d7
commit 9f54ec26e2

View File

@@ -121,6 +121,16 @@ public struct Where<D: DynamicObject>: WhereClauseType, FetchClause, QueryClause
self.init(true)
}
/**
Initializes a `Where` clause with an existing `Where` clause.
- parameter clause: the existing `Where` clause.
*/
public init(_ clause: Where<D>) {
self.init(clause.predicate)
}
/**
Initializes a `Where` clause with a predicate that always evaluates to the specified boolean value