sqlite - How to save the content of a MOC to a file, with no -wal and no -shm? -
sqlite - How to save the content of a MOC to a file, with no -wal and no -shm? -
i want save content of moc
file myfile.ext
. works well, info saved file have auxiliary files in addition:
myfile.ext-wal
myfile.ext-shm
are these files necessary purpose (saving content of moc
file)? "ship" info in 1 file. furthermore, when 1 time again data, utilize url
of myfile.ext
.
if not necessary, possible avoid creation?
as cl indicated necessary in wal mode. disable journaling mode when creating persistent store pass flowing option.
nsdictionary *options = @{nssqlitepragmasoption: @{@"journal_mode": @"delete"}; _coordinator = [_persistentstorecoordinator addpersistentstorewithtype:nssqlitestoretype configuration:nil url:url options:options error:&storeerror];
when run app 1 time again -wal should disappear , -shm can deleted or ignored. info should in 1 sqlite file.
sqlite cocoa core-data wal
Comments
Post a Comment