Contents

MDQueryGetCountOfResultsWithAttributeValue(_:_:_:)

Returns the number of results which have the given attribute and attribute value.

Declaration

func MDQueryGetCountOfResultsWithAttributeValue(_ query: MDQuery!, _ name: CFString!, _ value: CFTypeRef!) -> CFIndex

Parameters

  • query:

    The query.

  • name:

    The attribute name to return the result count of. If the attribute is not one of those requested in the valueListAttrs parameter, the behavior is undefined.

  • value:

    The attribute value for which to return the number of results with that value. This parameter may be NULL, in which case the number of results that do not contain the specified attribute is returned.

Return Value

The number of results containing that attribute and value.

Discussion

This count may change over time if the query allows live-updates.

See Also

Getting Query Result Values