Re: Disabling Core Data WAL journal_mode with NSPersistentDocument
Re: Disabling Core Data WAL journal_mode with NSPersistentDocument
- Subject: Re: Disabling Core Data WAL journal_mode with NSPersistentDocument
- From: Mike Abdullah <email@hidden>
- Date: Fri, 01 Nov 2013 22:17:05 +0000
On 1 Nov 2013, at 18:28, Sean McBride <email@hidden> wrote:
> 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?
As I understand it, yes.
_______________________________________________
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