# NSManagedObjectContext Extension Reference

# NSManagedObjectContext

    class NSManagedObjectContext : NSObject, NSCoding, NSLocking

### FetchableSource

- `fetchExisting(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchExisting<D>(_ object: D) -> D? where D : DynamicObject

- `fetchExisting(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchExisting<D>(_ objectID: NSManagedObjectID) -> D? where D : DynamicObject

- `fetchExisting(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchExisting<D, S>(_ objects: S) -> [D] where D : DynamicObject, D == S.Element, S : Sequence

- `fetchExisting(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchExisting<D, S>(_ objectIDs: S) -> [D] where D : DynamicObject, S : Sequence, S.Element == NSManagedObjectID

- `fetchOne(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchOne<D>(_ from: From<D>, _ fetchClauses: FetchClause...) -> D? where D : DynamicObject

- `fetchOne(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchOne<D>(_ from: From<D>, _ fetchClauses: [FetchClause]) -> D? where D : DynamicObject

- `fetchOne(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchOne<B>(_ clauseChain: B) -> B.ObjectType? where B : FetchChainableBuilderType

- `fetchAll(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchAll<D>(_ from: From<D>, _ fetchClauses: FetchClause...) -> [D]? where D : DynamicObject

- `fetchAll(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchAll<D>(_ from: From<D>, _ fetchClauses: [FetchClause]) -> [D]? where D : DynamicObject

- `fetchAll(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchAll<B>(_ clauseChain: B) -> [B.ObjectType]? where B : FetchChainableBuilderType

- `fetchCount(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchCount<D>(_ from: From<D>, _ fetchClauses: FetchClause...) -> Int? where D : DynamicObject

- `fetchCount(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchCount<D>(_ from: From<D>, _ fetchClauses: [FetchClause]) -> Int? where D : DynamicObject

- `fetchCount(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchCount<B>(_ clauseChain: B) -> Int? where B : FetchChainableBuilderType

- `fetchObjectID(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectID<D>(_ from: From<D>, _ fetchClauses: FetchClause...) -> NSManagedObjectID? where D : DynamicObject

- `fetchObjectID(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectID<D>(_ from: From<D>, _ fetchClauses: [FetchClause]) -> NSManagedObjectID? where D : DynamicObject

- `fetchObjectID(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectID<B>(_ clauseChain: B) -> NSManagedObjectID? where B : FetchChainableBuilderType

- `fetchObjectIDs(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectIDs<D>(_ from: From<D>, _ fetchClauses: FetchClause...) -> [NSManagedObjectID]? where D : DynamicObject

- `fetchObjectIDs(_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectIDs<D>(_ from: From<D>, _ fetchClauses: [FetchClause]) -> [NSManagedObjectID]? where D : DynamicObject

- `fetchObjectIDs(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func fetchObjectIDs<B>(_ clauseChain: B) -> [NSManagedObjectID]? where B : FetchChainableBuilderType

### QueryableSource

- `queryValue(_:_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func queryValue<D, U>(_ from: From<D>, _ selectClause: Select<D, U>, _ queryClauses: QueryClause...) -> U? where D : DynamicObject, U : QueryableAttributeType

- `queryValue(_:_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func queryValue<D, U>(_ from: From<D>, _ selectClause: Select<D, U>, _ queryClauses: [QueryClause]) -> U? where D : DynamicObject, U : QueryableAttributeType

- `queryValue(_:)`

  #### Declaration

  Swift

      @nonobjc
      public func queryValue<B>(_ clauseChain: B) -> B.ResultType? where B : QueryChainableBuilderType, B.ResultType : QueryableAttributeType

- `queryAttributes(_:_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func queryAttributes<D>(_ from: From<D>, _ selectClause: Select<D, NSDictionary>, _ queryClauses: QueryClause...) -> [[String : Any]]? where D : DynamicObject

- `queryAttributes(_:_:_:)`

  #### Declaration

  Swift

      @nonobjc
      public func queryAttributes<D>(_ from: From<D>, _ selectClause: Select<D, NSDictionary>, _ queryClauses: [QueryClause]) -> [[String : Any]]? where D : DynamicObject

- `queryAttributes(_:)`

  #### Declaration

  Swift

      public func queryAttributes<B>(_ clauseChain: B) -> [[String : Any]]? where B : QueryChainableBuilderType, B.ResultType == NSDictionary

### FetchableSource, QueryableSource

- `unsafeContext()`

  #### Declaration

  Swift

      @nonobjc
      public func unsafeContext() -> NSManagedObjectContext