Files
GRDB.swift/TODO.md
T
2015-12-11 06:18:01 +01:00

2.5 KiB

  • #2: this commit may be how stephencelis fixed it: https://github.com/stephencelis/SQLite.swift/commit/8f64e357c3a6668c5f011c91ba33be3e8d4b88d0
  • Study SQLCipher
  • IN (?) sql snippet, with an array argument.
  • Write sample code around NSFetchedResultsController: fetch and output a list of TableView sections & row differences.
  • Compare DatabaseCoder with http://mjtsai.com/blog/2015/11/08/the-java-deserialization-bug-and-nssecurecoding/
  • Write tests for classes that adopt DatabasePersistable and MutableDatabasePersistable. Check that a class that adopts DatabasePersistable can set its rowID. If not, fix it, or fix the documentation in README that reads "Classes should prefer adopting DatabasePersistable..."
  • Now that DatabasePersistable is out, Record has this didInsertWithRowID(:forColumn:) which calls updateFromRow. When we document "The updateFromRow method MUST NOT assume the presence of particular columns. The Record class itself reserves the right to call updateFromRow with arbitrary columns", we are actually talking about didInsertWithRowID, which is now exposed. Users may be confused.

Not sure:

  • Since Records' primary key are infered, no operation is possible on the primary key unless we have a Database instance. It's impossible to define the record.primaryKey property, or to provide a copy() function that does not clone the primary key: they miss the database that is the only object aware of the primary key. Should we change our mind, and have Record explicitly expose their primary key again?
  • Have Record adopt Hashable and Equatable, based on primary key. Problem: we can't do it know because we don't know the primary key until we have a database connection.

Require changes in the Swift language:

  • Turn DatabaseIntRepresentable and DatabaseStringRepresentable into SQLiteStatementConvertible when Swift allows for it.
  • Specific and optimized Optional.fetch... methods when rdar://22852669 is fixed.

Requires recompilation of SQLite:

Reading list: