You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let dataStore = SkopelosClient.sqliteStack()
dataStore.writeSync({ context in
// Update Records
let batchRequest = NSBatchUpdateRequest(
entityName: "User"
)
batchRequest.propertiesToUpdate = ["lastname": "T123T"]
batchRequest.resultType = .updatedObjectsCountResultType
do {
let result = try? context.execute(batchRequest)
print("Success")
} catch {
print("Error")
}
}).read({ context in
let users = User.SK_all(context)
print(users)
})
I am trying to batch update using Skopelos library. But its not printing log Success or Error. Breakpoint is hitting at line let result = try? context.execute(batchRequest) but not moving ahead.
Any help will be appriciated.
The text was updated successfully, but these errors were encountered:
shardul89
changed the title
How to use NSBatch
How to use NSBatchUpdateRequest
May 1, 2019
Here is the sample code that I am using:
I am trying to batch update using Skopelos library. But its not printing log
Success
orError
. Breakpoint is hitting at linelet result = try? context.execute(batchRequest)
but not moving ahead.Any help will be appriciated.
The text was updated successfully, but these errors were encountered: