Files
GRDB.swift/TODO.md
T
2016-12-07 11:07:57 +01:00

5.0 KiB

  • Insert TypedFetchRequest between FetchRequest and QueryInterfaceRequest
  • Think about supporting Cursor's underestimatedCount, which could speed up Array(cursor)
  • FetchedRecordsController: handle fetch errors
  • Swift 3.0.2 (Xcode 8.2): "Type inference will properly unwrap optionals when used with generics and implicitly-unwrapped optionals." Maybe this fixes row.value(named: "foo") as? Int?
  • Refactor Database notion of transaction/savepoints into a single type. Support INSERT OR ROLLBACK.
    • Since some statements may implicitly rollback transactions, we can not rely on explicit rollback statements to infer the transaction state. We can only rely on sqlite3_rollback_hook, assuming it is called even for implicit rollbacks (test with an INSERT OR ROLLBACK statement).
    • If we rely on sqlite3_rollback_hook to handle rollbacks, it may be a good idea to rely on sqlite3_commit_hook to handle commits (and have the commit() and rollback() simply perform statements and return)
    • we'll have to deal with two input sources for dealing with transactions: statement compilation observation for savepoint statements, and transaction hooks for transaction statements. Tricky.
  • Attach databases (this could be the support for fetched records controller caches). Interesting question: what happens when one attaches a non-WAL db to a databasePool?
  • sqlite3_rekey is discouraged (https://github.com/ccgus/fmdb/issues/547#issuecomment-259219320)
  • Restore dispatching tests in GRDBOSXTests (they are disabled in order to avoid linker errors)
    • DatabasePoolReleaseMemoryTests
    • DatabasePoolSchemaCacheTests
    • DatabaseQueueReleaseMemoryTests
    • DatabasePoolBackupTests
    • DatabasePoolConcurrencyTests
    • DatabasePoolReadOnlyTests
    • DatabaseQueueConcurrencyTests
  • FetchedRecordsController throttling (suggested by @hdlj)
  • What is the behavior inTransaction and inSavepoint behaviors in case of commit error? Code looks like we do not rollback, leaving the app in a weird state (out of Swift transaction block with a SQLite transaction that may still be opened).
  • GRDBCipher / custom SQLite builds: remove limitations on iOS or OS X versions
  • File protection: Read https://github.com/ccgus/fmdb/issues/262 and understand https://lists.apple.com/archives/cocoa-dev/2012/Aug/msg00527.html
  • Support for resource values (see https://developer.apple.com/library/ios/qa/qa1719/_index.html)
  • Query builder

Not sure

Require changes in the Swift language:

Requires recompilation of SQLite:

Reading list: