GRDB.swift v4.4.0 Release Notes

Release Date: 2019-09-06 // over 4 years ago
  • ๐Ÿš€ Released September 6, 2019 • diff

    ๐Ÿ†• New

    • #602: Don't keep the sqlCipher passphrase in memory longer than necessary
    • #603: DatabasePool write barrier

    ๐Ÿ“š Documentation Diff

    ๐Ÿ”จ SQLCipher passphrase management has been refactored: you will get deprecation warnings. Check out the rewritten [Encryption](README.md#encryption) chapter in order to migrate your code and remove those warnings.

    The [Advanced DatabasePool](README.md#advanced-databasepool) chapter has been extended for the new barrierWriteWithoutTransaction method.

    API Diff

    ๐Ÿ—„ Deprecations

     class DatabaseQueue {
    +    @available(*, deprecated)
         func change(passphrase: String) throws
     }
    
     class DatabasePool {
    +    @available(*, deprecated)
         func change(passphrase: String) throws
     }
    
     struct Configuration {
    +    @available(*, deprecated)
         var passphrase: String?
     }
    

    ๐Ÿ†• New Methods

     class DatabasePool {
    +    func barrierWriteWithoutTransaction<T>(_ updates: (Database) throws -> T) rethrows -> T
    +    func invalidateReadOnlyConnections()
     }
    
     class Database {
    +    func usePassphrase(_ passphrase: String) throws
    +    func changePassphrase(_ passphrase: String) throws
    +    var lastErrorCode: ResultCode
    +    var lastErrorMessage: String?
     }