Matchable

public protocol Matchable: Queryable

Used to give a query object the capability to perform SQL-like IN queries.

  • matchesAnyValueIn(_:) Default implementation

    Equivalent to the SQL-like IN operator where a predicate is created to match if a class’ property matches ANY value in a CollectionType. Equivalent to creating this predicate:

    class Kraken {
        var name: String
    }
    NSPredicate(format: "name IN %@", listOfObjects)
    

    Fetch the `Kraken` object if the value of its `name` property matches any value in the `listOfObjects` array.

    • Parameters:
    • collection: An Array or Set of objects to match against.

    Default Implementation

    Equivalent to the SQL-like IN operator where a predicate is created to match if a class’ property matches ANY value in a CollectionType. Equivalent to creating this predicate:

    class Kraken {
        var name: String
    }
    NSPredicate(format: "name IN %@", listOfObjects)
    

    Fetch the `Kraken` object if the value of its `name` property matches any value in the `listOfObjects` array.

    • Parameters:
    • collection: An Array or Set of objects to match against.

    Declaration

    Swift

    @discardableResult func matchesAnyValueIn<U: Collection>(_ collection: U) -> FinalizedIncluder<BuilderType>