-
Notifications
You must be signed in to change notification settings - Fork 363
Changelog
YapDatabase version history
-
Added YapDatabaseHooks extension.
-
Added many annotations for Swift (nullability, unused).
-
Added ability to fetch previous versionTag of YapDatabaseView.
This assists in configuring a YapDatabaseView instance to match the previous app run.
Commit 98dd700bdebb5a9d60c25c60aaf13a745288fb99. -
Added YapDatabaseOptions.aggressiveWALTruncationSize property.
A few edge-case scenarios were discovered where the WAL file could grow without bound. This change adds an "aggressive" checkpoint operation, along with a new YapDatabaseOptions property to control when this aggressive checkpoint should be executed. -
Now allows a YapDatabase instance to be un-encrypted regardless of whether SQLCipher is present.
Commit 49ff0ad229a1676cde93790bc5b5df4876f68941.Fixed Issues
-
Issue #157 - Clear out the WAL when the database is configured on startup
-
Issue #166 - Changed YDB_NodeDeleteRules to use NS_OPTIONS
-
Issue #167 - Minor bug fix for YapDatabaseSecondaryIndexTransaction
-
Fixed several bugs in the CloudKitTodo sample app.
Fixed Issues
-
Issue #146 - Fix SearchResultsExample compile failure
-
Issue #147 - Remove redundant options property declaration
-
Added YapDatabaseCloudKit extension.
Allows you to automatically sync items in the database with Apple's CloudKit service.
Includes sample project (CloudKitTodo) which demonstrates a working Todo app that syncs using YapDatabaseCloudKit extension. -
Added extension hooks that trigger before operations are applied (pre-hooks)
-
Added YapDatabaseViewOptions.skipInitialViewPopulation
-
Added sqlite version property to YapDatabase class.
API Changes
-
YapDatabaseOptions.passphraseBlock is now YapDatabaseOptions.cipherKeyBlock.
Now returns NSData instead of NSString. Better matches sqlite3_key API.
Commit 447f5a449d9391c78f61ddc255b296996c7091b3. -
YapDatabaseSanitizer is now split into YapDatabasePreSanitizer & YapDatabasePostSanitizer.
Allows for cleanup after objects have been processed by extensions.
Commit 88ef306b0e09b8d795452e15fe4eba7e4b40b9de. -
Minor API change for view enumeration methods with a filter.
The filter parameter now comes first in the parameter list (as its block is invoked first).
Commit c94ce122baf92ea66f213aeb84f4f0a1256c1e98.
-
Exposed YapCache to allow it to be used outside of YapDatabase.
Works similar to NSCache. YapCache is faster, but not thread-safe.
Commit f678c89ee24d121bbbab57eda4221c0f4e1dd3f9.Fixed Issues
-
Issue #128 - Flexible range minLength bug
-
Issue #125 - View mapping notification bug
-
Added
[connection pragmaAutoVacuum]
method.
This assists in determining if a vacuum (of a pre-2.5 database) is needed.
Commit ad44c04e3a8de4c3837404910aead36f0c4119e7. -
Added convenience method:
[viewTransaction isEmptyGroup:]
Commit c464004f7c1c625c6e4da349dabd65e246cb345d. -
Added support for NSArray parameters to YapDatabaseQuery
For example:
[YapDatabaseQuery queryWithFormat:@"WHERE col IN (?)", anArray]
Commit 5701e64c606fad93e0713b52786e0a1667ec6fc6API Changes
-
Added YapWhitelistBlacklist class.
Previously, most extensions supported options.allowedCollections. This was a simple NSSet of allowed collections. This property has been converted from the simple NSSet to the YapWhitelistBlacklist class, which supports whitelists, blacklists, and even more advanced functionality via block-based matching.
Commit d441af1a05d39d7e8904ce186cca80089ecdb28b. -
Replaced
[transaction setPrimitiveData:]
methods with[transaction setObject::::serializedObject:]
.
The previous methods were effectively broken since v2.0, with the addition of extensions. The new methods add the ability to provide pre-serialized versions of the objects & metadata. An optimization that allows the method to skip the serialization step.
Commit 58c0a6b7292d30dab1cac9ba861e6c4df38be6ce. -
Simplifying the API for creating Views
Instead of passing a block & blockType, there is a new wrapper class that automatically sets the blockType for you. This also helps when using YDBViews in Swift.
Commit db28cc46be7aaba89189ed3cbb58e8f2f59542c0.Fixed Issues
-
Issue #23 - groupingBlock never called with setPrimitiveData:
-
Issue #91 - YapDatabaseView in Swift
-
Performance optimization for YapCache.
YapCache is used internally for many operations. So performance improvements here increase performance for just about every operation.
Commit e1b2e91f9a511d3dbdac21cc38218b5c10b73817. -
Adding ability to run VACUUM command
Can be run either synchronously or asynchronously. This is primarily for pre-2.5 databases, where thepragma auto_vacuum
was not properly set. But VACUUM can also be useful for long-lived databases, in order to defragment the database.
Commit 3bd290a99bb856480f6b56b01d5cd9138cd41ae2.Fixed Issues
-
Issue #113 - didReceiveMemoryWarning in YapDatabaseConnection locks up main thread
-
Fixed a few crashes in [YapDatabaseView - getSectionChanges:rowChanges:::]
Commit dc544a5fa0b83a806daa86833d10aa3cd7610a4f.
Commit dc10016e6cd8493a064d32cab9d727377d9f3747. -
Added
[viewConnection hasChangesForGroup:inNotifications:]
&[viewConnection hasChangesForAnyGroups:inNotifications:]
Commit 74de12c9805973e38c061a73c66b7989385bc89e.
-
NEW extension: YapDatabaseSearchResultsView
Allows you to pipe search results from YapDatabaseFullTextSearch into a YapDatabaseView. This makes it easy to display search results in a tableView or collectionView. -
YapDatabase now sets
pragma auto_vacuum = FULL
for new databases.
This ensures the database file gets truncated when a lot of data is deleted.
Commit a4ab5714cfd861b25078fbe6aaeade3638a260e9. -
YapDatabase now sets
pragma journal_size_limit = 0
by default.
This should result in the WAL file staying much smaller during continued heavy use of the database. This setting is also configurable viaYapDatabaseOptions.pragmaJournalSizeLimit
.
Commit e230dbcda5462ac06710f1a43c0be4890c958d5f. -
Fixing
pragma synchronous
documentation & code.
Apparently "pragma synchronous" defaults to "full", and not "normal" as the sqlite documentation states. It also appears this needs to be set per-connection. None of this is very well documented in sqlite.
Commit 59b79ae37eb01f5227ebfbab0d1360f6dbdd0e31. -
Improved configurability of YapDatabaseViewMappings
One can now configure a dynamic setting for "all" groups, and then provide specific overrides for particular groups.
Commit ee253306bfda2136b6a7961285b7ff46b04c5a33. -
Fixed potential crash: mappings with autoGroupConsolidation + dynamicGroups
Improper sectionChanges / rowChanges may have been calculated when using mappings with autoGroupConsolidation + dynamicGroups.
Commit cf8f2c9a016f9fe4d8a5fec554e6fce7be0d69a3. -
Added
[YapDatabaseQuery queryMatchingAll]
-
Added
[viewConnection enumerateGroupsUsingBlock:]
-
Added ```[viewTransaction enumerate...withFilter:]```` methods
-
Various performance improvements for YapDatabaseView.
-
YapDatabaseRelationship extension now supports encrypting the destinationFilePath.
API Changes
-
Changed
[connection asyncReadWithBlock:completionBlock:completionQueue:]
to[connection asyncReadWithBlock:completionQueue:completionBlock]
Switched the order of completionQueue & completionBlock. This change was made for all similar methods throughout the project. The syntax change was made to make writing code for YapDatabase more readable. Also a nod to Swift and Trailing Closures.
Commit b1204068a65c5127f3068fb5b8d08ec49529e216. -
Changed
[database unregisterExtension:]
to[database unregisterExtensionWithName:]
Commit 628e3b2e6c9d0f1e5986a744101100e98bbd8e40.Fixed Issues
-
Issue #103 - getSectionChanges can be slow for very large transactions
-
Issue #104 - SecondaryIndex does not support “partial” or “conditional” datasets
-
Issue #89 - Using YapDatabaseViewMappings with fixed range