All Versions
267
Latest Version
Avg Release Cycle
15 days
Latest Release
-

Changelog History
Page 17

  • v0.80.0 Changes

    ๐Ÿš€ Released September 7, 2016

    ๐Ÿ›  Fixed

    • Database.tableExists() learned about temporary tables

    ๐Ÿ†• New

    • ๐Ÿ‘ WatchOS support

    • QueryInterfaceRequest.deleteAll() deletes database rows:

      try Wine.filter(corked == true).deleteAll(db)
      
  • v0.79.4 Changes

    ๐Ÿš€ Released August 17, 2016

    ๐Ÿ›  Fixed

    • ๐Ÿ›  DatabasePool can now open an existing database which is not yet in the WAL mode, and then immediately read from it. It used to crash unless at least one write operation was performed before any read (fixes #102).
  • v0.79.3 Changes

    ๐Ÿš€ Released August 16, 2016

    ๐Ÿ›  Fixed

    • Table creation DSL accepts auto references with implicit primary key:

      try db.create(table: "nodes") { t in
          t.column("id", .Integer).primaryKey()
          t.column("parentId", .Integer).references("nodes")
      }
      

    ๐Ÿ†• New

    • ๐Ÿ‘‰ Use SQLColumn of the query interface when extracting values from rows:

      let nameColumn = SQLColumn("name")
      let name: String = row.value(nameColumn)
      
  • v0.79.2 Changes

    ๐Ÿš€ Released August 10, 2016

    ๐Ÿ›  Fixed

    • โšก๏ธ Persistable used to generate sub optimal UPDATE requests.
  • v0.79.1 Changes

    ๐Ÿš€ Released August 10, 2016

    ๐Ÿ›  Fixed

    • ColumnDefinition check and references methods can now define several constraints:

      try db.create(table: "users") { t in
          t.column("name", .Text).notNull()
              .check { length($0) > 0 }
              .check { !["root", "admin"].contains($0) }
      }
      
    • โšก๏ธ Persistable update, exists and delete methods now work with objects that have a nil primary key. They used to crash.

    • โšก๏ธ The update(_:columns:) method, which performs partial updates, no longer ignores unknown columns.

  • v0.79.0 Changes

    ๐Ÿš€ Released August 8, 2016

    ๐Ÿ’ฅ Breaking Change

    • 0๏ธโƒฃ Column creation method defaults(_:) has been renamed defaults(to:).

      try db.create(table: "pointOfInterests") { t in
          t.column("favorite", .Boolean).notNull().defaults(to: false)
          ...
      }
      
  • v0.78.0 Changes

    ๐Ÿš€ Released August 6, 2016

    ๐Ÿ†• New

    • ๐Ÿš€ Upgrade sqlcipher to v3.4.0 (announcement, changelog)

    • ๐Ÿ“š DSL for table creation and updates (closes #83, documentation):

      try db.create(table: "pointOfInterests") { t in
          t.column("id", .Integer).primaryKey()
          t.column("title", .Text)
          t.column("favorite", .Boolean).notNull()
          t.column("longitude", .Double).notNull()
          t.column("latitude", .Double).notNull()
      }
      
    • ๐Ÿ‘Œ Support for the length SQLite built-in function:

      try db.create(table: "persons") { t in
          t.column("name", .Text).check { length($0) > 0 }
      }
      
    • Row adopts DictionaryLiteralConvertible:

      let row: Row = ["name": "foo", "date": NSDate()]
      

    ๐Ÿ’ฅ Breaking Changes

    • Built-in SQLite collations used to be named by string: "NOCASE", etc. Now use the SQLCollation enum: .Nocase, etc.

    • PrimaryKey has been renamed PrimaryKeyInfo:

      let pk = db.primaryKey("persons")
      pk.columns  // ["id"]
      
  • v0.77.0 Changes

    ๐Ÿš€ Released July 28, 2016

    ๐Ÿ†• New

    • Database.indexes(on:) returns the indexes defined on a database table.

    • Database.table(_:hasUniqueKey:) returns true if a sequence of columns uniquely identifies a row, that is to say if the columns are the primary key, or if there is a unique index on them.

    • โšก๏ธ MutablePersistable types, including Record subclasses, support partial updates:

      try person.update(db)                     // Full update
      try person.update(db, columns: ["name"])  // Only updates the name column
      

    ๐Ÿ’ฅ Breaking Changes

    • โšก๏ธ MutablePersistable update and performUpdate methods have changed their signatures. You only have to care about this change if you customize the protocol update method.

       protocol MutablePersistable : TableMapping {
      -func update(db: Database) throws
      +func update(db: Database, columns: Set<String>) throws
       }
      
       extension MutablePersistable {
       func update(db: Database) throws
      +func update(db: Database, columns: Set<String>) throws
      +func update<S: SequenceType where S.Generator.Element == SQLColumn>(db: Database, columns: S) throws
      +func update<S: SequenceType where S.Generator.Element == String>(db: Database, columns: S) throws
      -func performUpdate(db: Database) throws
      +func performUpdate(db: Database, columns: Set<String>) throws
       }
      
  • v0.76.0 Changes

    ๐Ÿš€ Released July 19, 2016

    ๐Ÿ’ฅ Breaking Change

    • The query interface order method now replaces any previously applied ordering (related issue: #85):

      // SELECT * FROM "persons" ORDER BY "name"
      Person.order(scoreColumn).order(nameColumn)
      
  • v0.75.2 Changes

    ๐Ÿš€ Released July 18, 2016

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed crashes that could happen when using virtual tables (fixes #82)