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
valuesList of dictionaries to insert , the keys should match with the Entity attribute names.
contextIn which context to execute the request, default is newBackgroundContext.
completionThe block the execute when the request finishes, true if the request is success or false.
InsertRequest Class Reference