Skip to content
Robbie Hanson edited this page Nov 8, 2019 · 49 revisions

YapDatabase version history

4.0 (2019-11-08)

  • Proper support for Swift
  • Support for any swift class/struct that conforms to Codable protocol
  • The serializer/deserializer are now configurable on a per-collection basis
  • CocoaLumberjack dependency replaced with configurable logHandler

3.1.4 (2019-10-15)

  • YapDBCloudCore Internal API change (for those subclassing YapDBCloudCore) (commit 3b0088b)

3.1.3 (2019-6-24)

  • YapDatabaseActionManager now supports a custom closure for scheduling action items (commit 943e05d)
  • Issue #485 - Support for updating an AutoView's sorting block without updating it's grouping block
  • Issue #486 - Block arguments decorated w/ NS_NOESCAPE where appropriate

3.1.2 (2019-1-18)

  • Improvements:

    • YapDatabaseCloudCore now supports 2 upload strategies: CommitGraph & FlatGraph
    • Podspec now has a modulemap option for Swift developers who are subclassing YapDatabaseCloudCore
  • General Bug Fixes:

    • Issue #468 - Fixed crash in YapDatabaseSearchResultsViewTransaction
    • Issue #477 - Debug check for duplicated groups in YapDatabaseViewMappings

3.1.1 (2018-7-12)

  • New features:
    • [YapDatabase flushExtensionRequestsWithCompletionQueue:completionBlock:]
    • YapDatabaseModifiedNotification now specifies inserted keys ()

3.1 (2018-6-15)

  • Requirements Change:

  • New minimum deployment target for macOS: 10.10

  • API Changes:

    • The signature of the FullTextSearch handler has been modified to bring it inline with the other database extensions. It now passes the current read transaction as a parameter to the FTS handler blocks. (Issue #440)

    • The YapDatabase.defaultX properties have been deprecated in favor of the new YapDatabase.connectionDefaults property. This means the compiler will prompt you to change your code from this: database.defaultObjectCacheLimit = 5000 to this: database.connectionDefaults.objectCacheLimit = 5000 (Commit 102a343)

  • New Features:

    • Encrypted databases (SQLCipher) now support unencrypted headers. This prevents app termination (by the OS) when backgrounding the app & sharing an encrypted database with an app extension. (Issue #439)

    • YapDatabaseConnectionPool: A simple load balancer designed for background (non-main-thread) tasks that perform read-only transactions.

  • General Bug Fixes:

  • Issue #426 - Can't Delete AND Notify

    • Issue #437 - Possible deadlock in [YapDatabaseConnection dealloc]
    • Issue #444 - Too many warnings in Xcode 9

3.0.1 (2017-7-18)

  • API Change: It was discovered that registering extensions with your own custom YDBConnection was unsafe, and could lead to deadlock. (Issue #371) Upon analysis, it was determined that there was no safe way to fix the API, as it was simply broken.

    • A custom connection can no longer be passed to the registerExtension family of methods.
    • To replace the previous functionality, the methods now allow you to pass an (optional) YapDatabaseConnectionConfig object.
  • NEW method: [YapDatabaseTransaction addCompletionQueue:completionBlock:]

  • Performance improvements: The checkpointing architecture was modified in response to detailed performance problems from several developers. The result should be smarter checkpointing, and an "aggressive" strategy that actually works.

  • Issue #401 - Flushing beginImmediateTransactionStatement

  • Issue #403 - Fix warnings

  • Issue #404 - Fixed build errors and bad project references

  • Issue #408 - Cross process notifications about all db events

  • Issue #409 - FTS5 with bm25 ranking queries

  • Issue #410 - Replace OSSpinLock with os_unfair_lock when building for macOS 10.12, iOS 10.0, watchOS 3.0 or tvOS 10.0.

  • Issue #411 - Add prefix for NSDate category methods.

  • Issue #412 - Add some explicit casts when implicitly converting types.

  • Issue #413 - Fixed shadowing of local variables by renaming them.

  • Issue #414 - Make -initWithReachabilityRef: retain the ref argument, fixing a Clang analyzer warning.

3.0 (2017-5-17)

  • Requirements Change: New minimum deployment targets:
     - macOS: 10.9
     - iOS: 8.0

  • API Change: YapDatabaseView has been converted into an abstract class, with 2 concrete subclasses: YapDatabaseAutoView & YapDatabaseManualView. YapDatabaseAutoView has the same functionality as the previous YapDatabaseView extension in v2.X. (So if you were using YapDatabaseView, just change the class type to YapDatabaseAutoView in your code.)

  • Internal API Change: (for extension developers)
    All of the 'handleX' methods have been renamed to 'didX'. E.g. 'handleInsertObject:' -> 'didInsertObject:'. See commit aaf9941 for more info.

  • NEW extension: YapDatabaseManualView
    This works just like an AutoView, but allows you to manually sort the objects. (As opposed to supplying a sorting block.) Useful if your user can drag items around to re-order them manually.

  • NEW extension: YapDatabaseCloudCore
    The CloudCore extension provides an extensible base for handling many of the issues involved with syncing data between the client and server.

  • Now supports both CocoaLumberjack v2 or v3

  • Issue #399 - Fixed several YapDatabaseRelationship extension bugs

2.9.3 (2016-9-8)

  • Replaced external 'Reachability' dependency with embedded 'YapReachability' class. This allows the ActionManager to run on tvOS & watchOS.

  • Fixed timing bugs in ActionManager extension

2.9.2 (2016-9-7)

  • Added support for watchOS

  • Issue #335 - Retain cycle in ActionManager extension

  • Issue #345 - YapDatabaseCloudKit: Cast issue

2.9.1 (2016-4-28)

  • Fixed multiple podspec issues

2.9 (2016-4-12)

2.8.3 (2016-3-3)

  • Issue #277 - Silence a shadowed variable declaration warning

  • Issue #278 - compiler isn't warning about improper parameter type

  • Issue #288 - YapDatabaseHooks extension doesn't seem to be respecting the allowedCollections property when specified

  • Issue #289 - Incorrect nullability annotation & incomplete documentation for YapDatabaseRelationshipNode protocol's yapDatabaseRelationshipEdgeDeleted method

2.8.2 (2016-2-3)

  • API Change: YapDatabaseSecondaryIndexHandler now has a transaction parameter.

  • Improved default URL serialization for YapDatabaseRelationship.
    If the file doesn't exist, the serializer will find a parent directory that does exist, generate a bookmark for that, and then serialize the bookmark along with the relative path of the non-existent file. This allows for proper serialization of files that don't yet exist (file created after database edge).
    Commit 716b0ed14d0b47b7af0d44e3e77838c177c3e812.

  • several nullability annotation fixes

  • Issue #266 - Bug in repopulateTables in YapDatabaseCloudKitTransaction

  • Issue #270 - use mutableCopy for assign deletedRecordIDs

2.8.1 (2016-1-14)

  • modulemap was missing new ConnectionProxy extension

2.8 (2016-1-12)

  • NEW extension: YapDatabaseConnectionProxy

  • API Change: YapDatabaseRelationship now uses NSURL to reference destination files. It previously used a string-based filePath, which proved especially brittle on iOS/Simulator, as the app's home folder is regularly moved by the operating system (which would break all non-relative filePath's, which is what the relationship extension wanted to store). The new system enforces NSURL, and takes advantage of NSURL's bookmark system to ensure that file references remain valid even if the filePath changes.

  • YapDatabaseHooks extension now supports "touch" events.

  • New podspec layout allows installation of specific extensions. I.e. you can optionally choose to install just the "core", and then pick-and-choose which extensions (if any) you want installed alongside it. (By default, every extension is installed, just as before.)

  • Issue #252 - deadlock detection for executing a transaction within a transaction

  • Issue #255 - enumeration within enumeration bug

  • Issue #256 - Bug in Filtered View

  • Issue #216 - YapDatabaseHooks causes bug in YapDatabaseFilteredView

2.7.7 (2015-12-5)

  • Added tvOS support to podspec

  • Issue #246 - YapDatabaseCloudKit performance improvements

2.7.6 (2015-11-13)

  • Critical bug fix for Issue #245 - potential deadlock in YapDatabaseConnection
    Bug was introduced in 2.7.5

2.7.5 (2015-11-12)

  • Fixes for CocoaPods & Carthage

  • Added internal sqlite VFS "shim" in order to simplify code and reduce responsibility for extensions

2.7.4 (2015-11-3)

  • Added nullability annotations for Swift

  • Added Carthage support

  • API Change: The modulemap for the framework has been modified so that each extension is now in its own explicit submodule. This means you'll need to explicitly import extensions: @import YapDatabase.YapDatabaseView;

  • Added more configuration options for SQLCipher

2.7.3 (2015-10-9)

  • API Change: Significant rewrite of YapDatabaseHooks extension.

  • All extensions now support YapDatabaseBlockInvoke (bit-mask) which allows for fine-grained control over when (under what circumstances) the block/handler should be invoked.

2.7.2 (2015-8-28)

  • Added touchRowForKey:inCollection: method to YapDatabaseTransaction, along with corresponding hook for extensions.

  • API Change: YapDatabaseCloudKit.recordHandler now includes a YapDatabaseReadTransaction parameter.

2.7.1 (2015-8-19)

  • Added support for aggregate functions (avg, max, min, sum, etc) to YapDatabaseQuery & YapDatabaseSecondaryIndex.

  • Added support for BLOB & NUMERIC types to YapDatabaseSecondaryIndex.

2.7 (2015-8-10)

  • Upgraded to use CocoaLumberjack 2.x

  • Added support for memory mapped I/O.

  • Added support for backing up a sqlite file
    Commit 79aa43a41cfaa8f295cc09815f5bd76913f16500.

  • API Change: Added "YapDatabaseReadTransaction *transaction" to parameter list for YapDatabaseView & YapDatabaseFilteredView blocks.
    This allows for more flexibility when implementing your grouping/sorting/filtering blocks. That is, you can now use other objects (in the database), or even other extensions to assist you in the implementation logic.
    Commit f3c977d3d62c0ade5de43c2520baafac8baf5a4f.

  • Added support for sqlite3_db_release_memory
    Allows for further memory reduction on demand, or in response to low-memory notifications on iOS.

  • Issue #195 - YapDatabaseLoggingTechniqueDisabled problem

2.6.5 (2015-6-27)

  • NEW extension: YapDatabaseRTreeIndex

  • Added Xcode project for dynamic framework

  • Added ability to set 'PRAGMA page_size' of underlying sqlite database.
    Commit 192e165da8f38578ea3dd06d39605541db64d849.

  • Issue #178 - EXC_BAD_INSTRUCTION crash when syncing for the first time

  • Issue #182 - Warnings & error when YapDatabaseLoggingTechnique is disabled

  • Issue #186 - Crash on replaceMetadata:forKey:inCollection with filtered views

  • Issue #170 - Improving Swift support for YapDatabaseQuery

2.6.4 (2015-5-13)

  • Fixed podspec

  • Removed many methods that had been marked as deprecated since v2.5

  • Adding getters for the sqlite '-wal' & '-shm' file paths.
    Commit ab78f558ec4e1fd234dc5c4e96240bd9f89115c7.

  • Issue #139 - Deallocating database, deleting it and rebuilding one

2.6.3 (2015-5-11)

  • Issue #171 - Not passing options in init method
    This was a serious issue that could lead to YapDatabase ignoring critical options during init, such as database encryption.

2.6.2 (2015-5-4)

  • NEW extension: YapDatabaseHooks

  • 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.

  • 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

2.6.1 (2015-3-24)

  • Fixed several bugs in the CloudKitTodo sample app.

  • Issue #146 - Fix SearchResultsExample compile failure

  • Issue #147 - Remove redundant options property declaration

2.6 (2015-3-15)

  • NEW extension: YapDatabaseCloudKit
    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 Change: YapDatabaseOptions.passphraseBlock is now YapDatabaseOptions.cipherKeyBlock.
    Now returns NSData instead of NSString. Better matches sqlite3_key API.
    Commit 447f5a449d9391c78f61ddc255b296996c7091b3.

  • API Change: YapDatabaseSanitizer is now split into YapDatabasePreSanitizer & YapDatabasePostSanitizer.
    Allows for cleanup after objects have been processed by extensions.
    Commit 88ef306b0e09b8d795452e15fe4eba7e4b40b9de.

  • API Change: YapDatabaseView enumeration filter parameter now comes first in the parameter list.
    The filter block is invoked first, so it makes more sense to list it first.
    Commit c94ce122baf92ea66f213aeb84f4f0a1256c1e98.

2.5.4 (2014-11-24)

2.5.3 (2014-10-8)

  • 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 5701e64c606fad93e0713b52786e0a1667ec6fc6

  • API Change: 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.

  • API Change: 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.

  • API Change: 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.

  • Issue #23 - groupingBlock never called with setPrimitiveData:

  • Issue #91 - YapDatabaseView in Swift

2.5.2 (2014-8-26)

  • 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 the pragma auto_vacuum was not properly set. But VACUUM can also be useful for long-lived databases, in order to defragment the database.
    Commit 3bd290a99bb856480f6b56b01d5cd9138cd41ae2.

  • Issue #113 - didReceiveMemoryWarning in YapDatabaseConnection locks up main thread

2.5.1 (2014-8-21)

2.5 (2014-8-12)

  • 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 via YapDatabaseOptions.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 Change: 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.

  • API Change: Changed [database unregisterExtension:] to [database unregisterExtensionWithName:]
    Commit 628e3b2e6c9d0f1e5986a744101100e98bbd8e40.

  • 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