ObjectMatcher

public enum ObjectMatcher

Provides a static matchesFilter method to match an object against a given object filter. Useful for retrieving matching objects on Query events without using a database adapter. Also useful to filter out Coaty objects that match given filter conditions before publishing with Advertise or Channel events.

Public methods.

  • Determines whether the given object matches the given context filter. Note that if you pass in an ObjectFilter, only the filter conditions are heeded for the result.

    Declaration

    Swift

    public static func matchesFilter(obj: CoatyObject?, filter: ContextFilter?) -> Bool

    Parameters

    obj

    The object to pass the filter on (optional).

    filter

    The context filter to apply (optional).

    Return Value

    true: on match; false otherwise