Instance Methodgrdb 7.4.1GRDB->Swift
formIntersection(_:)
Removes the elements of the set that aren’t also in the given cursor.
mutating func formIntersection(_ cursor: some Cursor<Element>) throws
Parameters
- cursor
A cursor of elements.
Removes the elements of the set that aren’t also in the given cursor.
mutating func formIntersection(_ cursor: some Cursor<Element>) throws
sSh4GRDBE16formIntersectionyyqd__K7ElementQyd__RszAA6CursorRd__lF
What are these?6MMX1
where Element:Hashable
A cursor of elements.
import Swift
import GRDB
A toolkit for SQLite databases, with a focus on application development
@frozen struct Set<Element> where Element : Hashable
An unordered collection of unique elements.
protocol Cursor<Element> : AnyObject
A type that supplies the values of some external resource, one at a time.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
init(_ cursor: some Cursor<Element>) throws
Creates a set containing the elements of a cursor.
init(_ cursor: some Cursor<Element>, minimumCapacity: Int) throws
Creates a set containing the elements of a cursor.
mutating func formUnion(_ cursor: some Cursor<Element>) throws
Inserts the elements of the given cursor into the set.
func intersection(_ cursor: some Cursor<Element>) throws -> Set<Element>
Returns a new set with the elements that are common to both this set and the given cursor.
func union(_ cursor: some Cursor<Element>) throws -> Set<Element>
Returns a new set with the elements of both this set and the given cursor.