# Tweak

    public struct Tweak : FetchClause, QueryClause, DeleteClause

The `Tweak` clause allows fine-tuning the `NSFetchRequest` for a fetch or query. Sample usage:

    let employees = transaction.fetchAll(
        From<MyPersonEntity>(),
        Tweak { (fetchRequest) -> Void in
            fetchRequest.includesPendingChanges = false
            fetchRequest.fetchLimit = 5
        }
    )

- `closure`

  The block to customize the `NSFetchRequest`

  #### Declaration

  Swift

      public let closure: (_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) -> Void

- `init(_:)`

  Initializes a `Tweak` clause with a closure where the `NSFetchRequest` may be configured.

  Important

  `Tweak`‘s closure is executed only just before the fetch occurs, so make sure that any values captured by the closure is not prone to race conditions. Also, some utilities (such as `ListMonitor`s) may keep `FetchClause`s in memory and may thus introduce retain cycles if reference captures are not handled properly.

  #### Declaration

  Swift

      public init(_ closure: @escaping (_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) -> Void)

  #### Parameters

  `closure` | the block to customize the `NSFetchRequest`

### CoreStoreSwiftType

- `bridgeToObjectiveC`

  #### Declaration

  Swift

      public var bridgeToObjectiveC: CSTweak { get }

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }