Files
GRDB.swift/TODO.md
2020-04-18 17:06:29 +02:00

7.6 KiB

Cleanup

Documentation

  • Document that creating "too many" ValueObservation increases database contention. This also applies to database pools, because when observations create reader contention, they also create writer contention. Context: https://github.com/groue/GRDB.swift/issues/601#issuecomment-524615772
  • Enhance the introduction to SQLRequest, based on the feedback in https://github.com/groue/GRDB.swift/issues/617
  • Association: document how to use aggregates with inner join (testAnnotatedWithHasManyDefaultMaxJoiningRequired)
  • Association: document ordered vs. non-ordered hasMany and hasManyThrough associations

Features

Unsure if necessary

Unsure how

  • Association limits: Author.including(optional: Author.books.order(date.desc).first)

  • Joins and full-text tables

  • UPSERT https://www.sqlite.org/lang_UPSERT.html

  • Support for "INSERT INTO ... SELECT ...".

  • Look at the jazzy configuration of https://github.com/bignerdranch/Deferred

  • Predicates, so that a filter can be evaluated both on the database, and on a record instance.

    After investigation, we can't do it reliably without knowing the collation used by a column. And SQLite does not provide this information elsewhere than in the full CREATE TABLE statement stored in sqlite_master.

  • ValueObservation erasure

    // Do better than this
    observation.mapReducer { _, reducer in AnyValueReducer(reducer) }
    
  • new.updateChanges(from: old) vs. old.updateChanges(with: { old.a = new.a }). This is confusing.

Reading list