Files
GRDB.swift/TODO.md
T
2016-11-05 15:01:20 +01:00

5.4 KiB

  • fetchedRecordsController.sections.count should return the same result as NSFetchedResultsController when there is no result.

  • Store dates as timestamp (https://twitter.com/gloparco/status/780948021613912064, https://github.com/groue/GRDB.swift/issues/97)

    • Global config?

    • New enum case in DatabaseValue.Storage?

      extension Date : DatabaseValueConvertible {
          var databaseValue: DatabaseValue {
              return DatabaseValue(storage: .date(self))
          }
      }
      extension DatabaseValue {
          func canonicalDatabaseValue(in database: Database) -> DatabaseValue {
              switch storage {
              case .date(let date):
                  switch database.configuration.dateFormat {
                      case .iso8601:
                          return ...
                      case .timestamp:
                          return ...
                  }
              default:
                  return self
              }
          }
      }
      
    • Rename DatabaseValueConvertible to Bindable?

      protocol Bindable {
          var databaseBinding: Binding { get }
          static func fromDatabaseValue(...)
      }
      protocol Binding {
          func databaseValue(in database: Database) -> DatabaseValue
      }
      extension Int : Binding { ... }
      extension String : Binding { ... }
      extension Date : Binding {
          func databaseValue(in database: Database) -> DatabaseValue {
              switch database.configuration.dateFormat {
                  case .iso8601:
                      return ...
                  case .timestamp:
                      return ...
              }
          }
      }
      
  • ROUND function: read http://marc.info/?l=sqlite-users&m=130419182719263

  • Remove DatabaseWriter.writeForIssue117 when https://bugs.swift.org/browse/SR-2623 is fixed (remove writeForIssue117, use write instead, and build in Release configuration)

  • 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

  • FetchedRecordsController: take inspiration from https://github.com/jflinter/Dwifft

  • 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

  • Have Row adopt LiteralDictionaryConvertible
    • ... allowing non unique column names
  • Remove DatabaseValue.value()
    • Don't talk about DatabaseValue.value() in README.md
  • Support for NSColor/UIColor. Beware UIColor components can go beyond [0, 1.0] in iOS10.

Require changes in the Swift language:

Requires recompilation of SQLite:

Reading list: