Mac Developer Library

Developer

AddressBook Framework Reference ABSearchElement Class Reference

Options
Deployment Target:

On This Page
Language:

ABSearchElement

The ABSearchElement class is used to specify a search query for records in the Address Book database. More...

Inheritance


Conforms To


Import Statement


import AddressBook @import AddressBook;

Availability


Available in OS X v10.2 and later.
  • Logical operators used to combine search elements.

    Declaration

    Swift

    typealias ABSearchConjunction = CFIndex

    Objective-C

    enum _ABSearchConjunction { kABSearchAnd, kABSearchOr }; typedef CFIndex ABSearchConjunction;

    Constants

    • kABSearchAnd

      kABSearchAnd

      Join the search elements together with the AND operand.

      Available in OS X v10.2 and later.

    • kABSearchOr

      kABSearchOr

      Join the search elements together with the OR operand.

      Available in OS X v10.2 and later.

    Discussion

    These constants are used by the searchElementForConjunction:children: method.

    Import Statement

    import AddressBook

    Availability

    Available in OS X v10.2 and later.

  • Comparisons used to construct search elements.

    Declaration

    Swift

    typealias ABSearchComparison = CFIndex

    Objective-C

    enum _ABSearchComparison { kABEqual, kABNotEqual, kABLessThan, kABLessThanOrEqual, kABGreaterThan, kABGreaterThanOrEqual, kABEqualCaseInsensitive, kABContainsSubString, kABContainsSubStringCaseInsensitive, kABPrefixMatch, kABPrefixMatchCaseInsensitive, kABBitsInBitFieldMatch, kABDoesNotContainSubString, kABDoesNotContainSubStringCaseInsensitive, kABNotEqualCaseInsensitive, kABSuffixMatch, kABSuffixMatchCaseInsensitive, kABWithinIntervalAroundToday, kABWithinIntervalAroundTodayYearless, kABNotWithinIntervalAroundToday, kABNotWithinIntervalAroundTodayYearless, kABWithinIntervalFromToday, kABWithinIntervalFromTodayYearless, kABNotWithinIntervalFromToday, kABNotWithinIntervalFromTodayYearless }; typedef CFIndex ABSearchComparison;

    Constants

    • kABEqual

      kABEqual

      Search for elements that are equal to the value.

      Available in OS X v10.2 and later.

    • kABNotEqual

      kABNotEqual

      Search for elements that are not equal to the value.

      Available in OS X v10.2 and later.

    • kABLessThan

      kABLessThan

      Search for elements that are less than the value.

      Available in OS X v10.2 and later.

    • kABLessThanOrEqual

      kABLessThanOrEqual

      Search for elements that are less than or equal to the value.

      Available in OS X v10.2 and later.

    • kABGreaterThan

      kABGreaterThan

      Search for elements that are greater than the value.

      Available in OS X v10.2 and later.

    • kABGreaterThanOrEqual

      kABGreaterThanOrEqual

      Search for elements that are greater than or equal to the value.

      Available in OS X v10.2 and later.

    • kABEqualCaseInsensitive

      kABEqualCaseInsensitive

      Search for elements that are equal to the value, ignoring case.

      Available in OS X v10.2 and later.

    • kABContainsSubString

      kABContainsSubString

      Search for elements that contain the value.

      Available in OS X v10.2 and later.

    • kABContainsSubStringCaseInsensitive

      kABContainsSubStringCaseInsensitive

      Search for elements that contain the value, ignoring case.

      Available in OS X v10.2 and later.

    • kABPrefixMatch

      kABPrefixMatch

      Search for elements that begin with the value.

      Available in OS X v10.2 and later.

    • kABPrefixMatchCaseInsensitive

      kABPrefixMatchCaseInsensitive

      Search for elements that begin with the value, ignoring case.

      Available in OS X v10.2 and later.

    • kABBitsInBitFieldMatch

      kABBitsInBitFieldMatch

      Search for elements that match the bits in ABPersonFlags.

      Available in OS X v10.3 and later.

    • kABDoesNotContainSubString

      kABDoesNotContainSubString

      Search for elements that do not contain the value.

      Available in OS X v10.4 and later.

    • kABDoesNotContainSubStringCaseInsensitive

      kABDoesNotContainSubStringCaseInsensitive

      Search for elements that do not contain the value, ignoring case.

      Available in OS X v10.4 and later.

    • kABNotEqualCaseInsensitive

      kABNotEqualCaseInsensitive

      Search for elements that are not equal to the value, ignoring case.

      Available in OS X v10.4 and later.

    • kABSuffixMatch

      kABSuffixMatch

      Search for elements that end with the value.

      Available in OS X v10.4 and later.

    • kABSuffixMatchCaseInsensitive

      kABSuffixMatchCaseInsensitive

      Search for elements that end with the value, ignoring case.

      Available in OS X v10.4 and later.

    • kABWithinIntervalAroundToday

      kABWithinIntervalAroundToday

      Search for elements that are within a time interval (in seconds) forward or backward from today.

      Available in OS X v10.4 and later.

    • kABWithinIntervalAroundTodayYearless

      kABWithinIntervalAroundTodayYearless

      Search for elements that are within a time interval (in seconds) forward or backward from this day in any year.

      Available in OS X v10.4 and later.

    • kABNotWithinIntervalAroundToday

      kABNotWithinIntervalAroundToday

      Search for elements that are not within a time interval (in seconds) forward or backward from today.

      Available in OS X v10.4 and later.

    • kABNotWithinIntervalAroundTodayYearless

      kABNotWithinIntervalAroundTodayYearless

      Search for elements that are not within a time interval (in seconds) forward or backward from this day in any year.

      Available in OS X v10.4 and later.

    • kABWithinIntervalFromToday

      kABWithinIntervalFromToday

      Search for elements that are within a time interval (in seconds) forward from today.

      Available in OS X v10.4 and later.

    • kABWithinIntervalFromTodayYearless

      kABWithinIntervalFromTodayYearless

      Search for elements that are within a time interval (in seconds) forward from this day in any year.

      Available in OS X v10.4 and later.

    • kABNotWithinIntervalFromToday

      kABNotWithinIntervalFromToday

      Search for elements that are not within a time interval (in seconds) forward from today.

      Available in OS X v10.4 and later.

    • kABNotWithinIntervalFromTodayYearless

      kABNotWithinIntervalFromTodayYearless

      Search for elements that are not within a time interval (in seconds) forward from this day in any year.

      Available in OS X v10.4 and later.

    Discussion

    These constants are used by the ABPerson method searchElementForProperty:label:key:value:comparison: and the ABGroup method searchElementForProperty:label:key:value:comparison:

    Import Statement

    import AddressBook

    Availability

    Available in OS X v10.2 and later.