Swiftpack.co - Package - vapor/fluent

Github

link
Stars: 977

Releases

Add ModelUser and ModelUserToken - 2020-01-21 03:32:12

Adds two new protocols ModelUser and ModelUserToken for easily implementing basic and bearer authentication using Fluent models. Docs will be available at https://docs.vapor.codes/4.0/fluent/authentication/

Add autoMigrate and autoRevert methods - 2020-01-18 21:02:21

Adds autoMigrate and autoRevert methods to Application. These methods allow for programmatically running the equivalent of --auto-migrate and --auto-revert.

try app.autoMigrate().wait()

These methods are useful when working with ephemeral databases like in-memory SQLite and for testing.

Pagination - 2020-01-16 23:03:00

Implements pagination helpers using new APIs from https://github.com/vapor/fluent-kit/pull/130.

struct TodoController {
    func index(req: Request) throws -> EventLoopFuture<Page<Todo>> {
        Todo.query(on: req.db).paginate(for: req)
    }
}

Fluent 4.0.0 Beta 2 - 2019-12-09 19:35:36

Updated to latest Vapor and FluentKit beta 2 changes.

Fluent 4.0.0 Beta 1 - 2019-10-24 22:14:50

  • Added DatabaseSessions and Session models for storing Vapor request sessions in your database. (#645)
  • Added Request.db helper for accessing request-specific database context.

Fluent 3.2.1 - 2019-10-07 18:53:40

  • Fixed an issue preventing soft-deleted rows from being force deleted. (#627, #628)

Fluent 4.0.0 Alpha 2.1 - 2019-08-29 21:35:59

Notes: This updated ConsoleKit release includes property wrapper support and internal cleanup. Fluent's MigrateCommand, and --auto-migrate and --auto-revert flags have been updated to use the new syntax.

Fluent 4.0.0 Alpha 2 - 2019-08-02 18:35:43

  • Updates to FluentKit 1 Alpha 2
  • Updates to Vapor 4 Alpha 2

Fluent 4.0.0 Alpha 1.1 - 2019-06-12 03:00:52

New:

  • Added --auto-migrate and --auto-revert flags for automatically managing migrations during boot (#634)

Fluent 4.0.0 Alpha 1 - 2019-06-06 17:46:32

More information on Vapor 4 alpha releases:

https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a

API Docs:

https://api.vapor.codes/fluent/master/Fluent/index.html

Fluent 3.2.0 - 2019-04-10 18:35:00

New:

  • Added QueryBuilder.copy(). (#621)

Fluent 3.1.3 - 2019-03-05 21:49:55

Fixed:

  • Fixed a bug where builder.group(...) calls that don't add any filters could yield an invalid query. (#616)

Fluent 3.1.2 - 2018-10-31 21:04:56

Fixed:

  • QueryBuilder's sort method now supports sorting joined models. (#580)

Fluent 3.1.1 - 2018-10-29 17:22:01

Fixed:

  • Calling update/create/save on a Future<Model> returns the saved model rather than the unwrapped model (#579)

Fluent 3.1.0 - 2018-10-17 16:35:56

New:

  • An optional default parameter has been added to QueryBuilder.sum(_:). This will be used when the result set of the query is zero, instead of throwing an error. (#568, #573, #571)

Fixed:

  • QueryBuilder.sum(_:) now throws a more helpful error message if the result set is empty.

Fluent 3.0.1 - 2018-10-10 22:02:24

Fixed:

  • QueryBuilder.update(_:to:) now correctly sets the updatedAt field if the model supports timestamps. (#565, #566)

Fluent 3.0.0 - 2018-07-17 02:21:41

Fluent 3.0 is here! 🎉 🖋 Swift ORM framework (queries, models, and relations) for building NoSQL and SQL database integrations.

See the updated documentation for more information: docs.vapor.codes/3.0/fluent/getting-started/

And of course, check out the API docs for detailed information about the public API: api.vapor.codes/fluent/latest/Fluent


Changes since latest RC:

Fixed:

  • Children relation can now be created with let variable. (#532)
  • KeyedCache set will now lookup existing entries first.
  • Removed deprecated methods.

Fluent 3.0.0 RC 3.0.2 - 2018-06-22 01:17:22

Fluent 3.0.0 RC 3.0.3 - 2018-06-22 01:17:13

Fluent 3.0.0 RC 4.0.1 - 2018-06-22 01:17:04

Fluent 3.0.0 RC 4.0.2 - 2018-06-22 01:16:54

Fluent 3.0.0 RC 4 - 2018-06-19 23:11:13

New:

  • Upgraded to vapor/sql 2.0 protocols.
  • Standardized FluentBenchmarker run method.
  • Add new Fluent benchmarks for sorting, subset operations, and range.

Fixed:

  • Fixed an issue where ranges would not be applied.
  • Fixed an issue where ranges would be off-by-one.

Fluent 3.0.0 RC 3.0.1 - 2018-06-15 15:53:24

Fixed:

  • Fixes a typo in enableReferences on DatabasesConfig (#505).
  • Adds deprecations for actions: overload when creating a reference (#506).

See 3.0.0 RC 3 for more information.

Fluent 3.0.0 RC 2.3.2 - 2018-06-15 03:39:00

Fluent 3.0.0 RC 2.3.3 - 2018-06-15 03:38:52

Fluent 3.0.0 RC 2.4 - 2018-06-15 03:38:35

Fluent 3.0.0 RC 3 - 2018-06-15 03:38:23

New:

  • Generic database queries: QueryBuilder and SchemaBuilder now store query types generic to each specific database. This means you can now do much of what required raw SQL queries with type-safe Swift!
  • Timestampable & SoftDeletable are now part of Model: This allows for users to opt in to exactly which timestamps they would like to use. It also removes a lot of type-erasing and casting that needed to happen internally. New lifecycle hooks have been added for soft-deletion as well.
  • Generic transactions + convenience methods: Transactions now allow for a generic return type. Use the new convenience method on DatabaseConnectable to perform a transaction.
  • Data and KeyPath conversion failures are now assertions. This makes working with Fluent a lot easier (huge reduction in try statements) for what really should be develop-time errors.
  • Aggregates are now generic.
  • New update(data:) and create(data:) methods on QueryBuilder allow for easy batch updates.
  • Joins now support joining additional models to previously joined tables.

Fixed:

  • Tons of bug fixes throughout Fluent and all of its drivers.

Breaking changes:

  • Model entity now defaults to the model's type name. It no longer attempts to create a lowercased, pluralized string. Implement static var entity: String on your model if you want to define a custom entity (#492).
  • Timestampable and SoftDeletable key paths must now be optional. Not-implementing these key paths (or returning nil) is equivalent to not conforming to the protocol.
  • join methods have been simplified: join(\Pet.userID, to: \User.id)
  • Please report any breaking changes you notice not listed--they may be unintentional

Fluent 3.0.0 RC 2.4.1 - 2018-05-02 16:39:34

Fixed:

  • Fixed a bug with OR/AND groups (#449, #466, #467).

Fluent 3.0.0 RC 2.3.1 - 2018-03-29 01:55:29

Fluent 3.0.0 RC 2.3 - 2018-03-27 22:55:29

New:

  • Added the ability to specify custom names for migrations. This is useful for situations where you are using two models from separate modules with identical names.
migrationConfig.add(migration: Foo.self, database: .sqlite name: "foo")
  • Added support for CountableClosedRange

Fixed:

  • Fixed an issue where SchemaUpdater would use .create action.
  • Added a benchmark test to ensure drivers can save nil values properly.

Milestone: 3.0.0-rc.2.3