Swiftpack.co - Package - vapor/fluent

Github

link
Stars: 1030

Releases

Fluent 4.0.0 - 2020-06-13 16:12:14

Docs: https://docs.vapor.codes/4.0/fluent/overview/ https://docs.vapor.codes/4.0/fluent/model/ https://docs.vapor.codes/4.0/fluent/relations/ https://docs.vapor.codes/4.0/fluent/migration/ https://docs.vapor.codes/4.0/fluent/query/ https://docs.vapor.codes/4.0/fluent/schema/ https://docs.vapor.codes/4.0/fluent/advanced/

More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802

Adds the ability to retrieve query history - 2020-06-04 17:10:08

This patch was authored and released by @mcdappdev.

Tracks database query history for a Request or Application (#689).

To use on the Application:

app.fluent.history.start()
app.fluent.history.stop()
app.fluent.history.clear()

Access the history by calling:

app.fluent.history.queries

The same methods/properties exist on Request:

req.fluent.history.start()
req.fluent.history.stop()
req.fluent.history.clear()
req.fluent.history

FluentKit 1.0.0 GM - 2020-05-29 21:45:39

This patch was authored and released by @tanner0101.

Updates this package for compatibility with latest version of FluentKit.

Add unique index to SessionRecord key - 2020-05-01 14:39:28

This patch was authored by @SusanDoggie and released by @tanner0101.

Adds a unique index to SessionRecord.key to improve data integrity and key lookup performance (#680).

⚠️ If you have already added the SessionRecord migration in production, you will need to add this unique index manually.

Fix deprecated renamed fix for ModelTokenAuthenticatable - 2020-04-16 16:17:10

This patch was authored by @0xTim and released by @tanner0101.

Fixes incorrect rename deprecation for ModelTokenAuthenticatable (#677).

Update to Vapor 4 GM - 2020-04-09 18:08:39

This patch was authored and released by @tanner0101.

Updated for final Vapor 4.0.0 release (#672).

  • ModelUser renamed to ModelAuthenticatable.
  • ModelUserToken renamed to ModelTokenAuthenticatable.
  • Sessions authenticator now creatable via static method.
- app.fluent.sessions.middleware()
+ User.sessionAuthenticator()
  • New ModelSessionAuthenticatable helper protocol added.
  • Session renamed to SessionRecord. Now uses _fluent_sessions schema.

Release Candidate 1 - 2020-03-01 22:10:39

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 - 2020-02-26 23:07:12

  • Now compatible with latest Vapor beta 4 and FluentKit beta 5

Export Custom Operators - 2020-02-05 21:00:06

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 - 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