# CSWhere Class Reference

# CSWhere

    @objc
    public final class CSWhere : NSObject, CSFetchClause, CSQueryClause, CSDeleteClause

The `CSWhere` serves as the Objective-C bridging type for `Where`.

See also

`Where`

- `predicate`

  The internal `NSPredicate` instance for the `Where` clause

  #### Declaration

  Swift

      @objc
      public var predicate: NSPredicate { get }

- `init(value:)`

  Initializes a `CSWhere` clause with a predicate that always evaluates to the specified boolean value

      MyPersonEntity *people = [transaction
         fetchAllFrom:CSFromClass([MyPersonEntity class])
         fetchClauses:@[CSWhereValue(YES)]]];

  #### Declaration

  Swift

      @objc
      public convenience init(value: Bool)

  #### Parameters

  `value` | the boolean value for the predicate

- `init(format:argumentArray:)`

  Initializes a `CSWhere` clause with a predicate using the specified string format and arguments

      NSPredicate *predicate = // ...
      MyPersonEntity *people = [transaction
         fetchAllFrom:CSFromClass([MyPersonEntity class])
         fetchClauses:@[CSWherePredicate(predicate)]];

  #### Declaration

  Swift

      @objc
      public convenience init(format: String, argumentArray: [NSObject]?)

  #### Parameters

  `format` | the format string for the predicate
  `argumentArray` | the arguments for `format`

- `init(keyPath:isEqualTo:)`

  Initializes a `CSWhere` clause that compares equality

  #### Declaration

  Swift

      @objc
      public convenience init(keyPath: KeyPathString, isEqualTo value: CoreDataNativeType?)

  #### Parameters

  `keyPath` | the keyPath to compare with
  `value` | the arguments for the `==` operator

- `init(keyPath:isMemberOf:)`

  Initializes a `CSWhere` clause that compares membership

  #### Declaration

  Swift

      @objc
      public convenience init(keyPath: KeyPathString, isMemberOf list: [CoreDataNativeType])

  #### Parameters

  `keyPath` | the keyPath to compare with
  `list` | the array to check membership of

- `init(predicate:)`

  Initializes a `CSWhere` clause with an `NSPredicate`

  #### Declaration

  Swift

      @objc
      public convenience init(predicate: NSPredicate)

  #### Parameters

  `predicate` | the `NSPredicate` for the fetch or query