What is the magic combination of options to send to the sqlite to completely
turn off journaling.
I have an initialization on install that brings down a lot of data. I don’t
need journaling at this point
and it balloons the memory storage upon install to over 500MB!
I have tried:
var options = Dictionary<NSObject, AnyObject>()
options[NSMigratePersistentStoresAutomaticallyOption] = true
options[NSInferMappingModelAutomaticallyOption] = true
options[NSSQLitePragmasOption] = ["journal_mode" : "TRUNCATE”]
or
options[NSSQLitePragmasOption] = ["journal_mode" : “OFF"]
or
options[NSSQLitePragmasOption] = ["journal_mode" : “DELETE”]
and
options[NSSQLiteManualVacuumOption] = true
even
options[NSSQLitePragmasOption] = ["journal_size_limit" : "20000”]
by :
do {
_ = try
self.managedObjectStore!.addSQLitePersistentStoreAtPath(storePath,
fromSeedDatabaseAtPath: nil, withConfiguration: nil, options: options)
} catch let error as NSError {
print("fail to add persistent store")
print(error)
}
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]