InsertRequest

@available(iOS 13, OSX 10.15, watchOS 6.0, tvOS 13, *)
public final class InsertRequest<T> where T : NSManagedObject

Insert Request

Create and perform insert requests.

  • Creates NSBatchInsertRequest.

    Declaration

    Swift

    public func insertBatchAsync(_ values: [[String : Any]], context: NSManagedObjectContext, completion: @escaping ((Bool) -> Void))

    Parameters

    values

    List of dictionaries to insert , the keys should match with the Entity attribute names.

    context

    In which context to execute the request, default is newBackgroundContext.

    completion

    The block the execute when the request finishes, true if the request is success or false.