Disabling Core Data WAL journal_mode with NSPersistentDocument
Disabling Core Data WAL journal_mode with NSPersistentDocument
- Subject: Disabling Core Data WAL journal_mode with NSPersistentDocument
- From: Sean McBride <email@hidden>
- Date: Fri, 01 Nov 2013 14:28:36 -0400
- Organization: Rogue Research Inc.
Hi all,
The 10.9 Core Data release notes say:
<https://developer.apple.com/library/mac/releasenotes/DataManagement/WhatsNew_CoreData_OSX/index.html>
------------------
The Core Data SQLite persistent store will default to using WAL journal_mode on all applications linked on or after 10.9. This mode offers better reliability and performance than the classic SQLite rollback (delete) journaling. WAL journal_mode is not, however, recommended for read-only database files, or for files that need to interoperate with OS X v10.6 or earlier. To get the previous behavior, add the following dictionary to the store options dictionary you pass to to NSPersistentStoreCoordinator’s addPersistentStoreWithType:configuration:URL:options:error: method:
@{ NSSQLitePragmaOptions : @{ @"journal_mode" : @"DELETE" } }
------------------
If using NSPersistentDocument one doesn't generally call that method, would the correct thing to do be to override configurePersistentStoreCoordinatorForURL:::::, mutate/create the store options dictionary and call super?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden