Releases: vapor/fluent
Update to Vapor 4 GM
This patch was authored and released by @tanner0101.
Updated for final Vapor 4.0.0 release (#672).
ModelUserrenamed toModelAuthenticatable.ModelUserTokenrenamed toModelTokenAuthenticatable.- Sessions authenticator now creatable via static method.
- app.fluent.sessions.middleware()
+ User.sessionAuthenticator()- New
ModelSessionAuthenticatablehelper protocol added. Sessionrenamed toSessionRecord. Now uses_fluent_sessionsschema.
Release Candidate 1
Updates to Swift 5.2.
Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.
Fluent Beta 3
- Now compatible with latest Vapor beta 4 and FluentKit beta 5
Export Custom Operators
Provides a workaround for SR-12132 which causes custom operators defined in FluentKit to not be exported correctly (fixes vapor/fluent-kit#144, #656)
Custom operators for String filtering will now be available by importing just Fluent:
~~: Value contains string=~: Value has string prefix~=: Value has string suffix!~: Value doesn't contain string!=~: Value doesn't have string prefix!~=: Value doesn't have string suffix
As well as operators for Array filtering:
~~: Value in array!~: Value not in array
Add ModelUser and ModelUserToken
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
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
Implements pagination helpers using new APIs from vapor/fluent-kit#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
Updated to latest Vapor and FluentKit beta 2 changes.
Fluent 4.0.0 Beta 1
- Added
DatabaseSessionsandSessionmodels for storing Vapor request sessions in your database. (#645) - Added
Request.dbhelper for accessing request-specific database context.