mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
3.1 KiB
3.1 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/
- databaseEdited -> hasDatabaseChanges, hasNotPersistedChanges, hasPersistentChangedValues (NSManagedObject)? Check if doc makes it clear that the changes are based on last fetch. The method name should make it clear too.
- Check Swift API Guideline https://swift.org/documentation/api-design-guidelines.html
- databaseTableName, etc.
- didInsertWithRowID(_:forColumn:)
- Read conversion methods conventions (fromRow, fromDatabaseValue)
- Row.value(named:) should return nil if column is not there.
- Row.value(named:) returns nil if column is not there.
- Update Row documentation
- Update "Optional Columns" chapter of RowConvertible documentation
- Record:
- Remove reloading
- Expose didInsertWithRowID(_:forColumn:)
- Make Person subclass that eats an extra column easier to write (in PersonWithOverrides)
- Update Record documentation
- Update Record playground
- Update JSONSynchronisation playground
- Update https://gist.github.com/groue/dcdd3784461747874f41
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.
- Conversion should crash when type mismatch (Optional.fetchOne(db, "SELECT 1"))
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:
- https://www.sqlite.org/c3ref/column_database_name.html could help extracting out of a row a subrow only made of columns that come from a specific table. Requires SQLITE_ENABLE_COLUMN_METADATA which is not set on the sqlite3 lib that ships with OSX.
Reading list:
- VACUUM (https://blogs.gnome.org/jnelson/)
- Full text search (https://www.sqlite.org/fts3.html. Related: https://blogs.gnome.org/jnelson/)
- https://www.sqlite.org/undoredo.html
- http://www.sqlite.org/intern-v-extern-blob.html
- List of documentation keywords: https://swift.org/documentation/api-design-guidelines.html#special-instructions