Skip to content

Releases: vapor/fluent

Add page size limit

24 May 20:47
c67c33a
Compare
Choose a tag to compare
This patch was authored by @pulpn0ir and released by @siemensikkema.

Adds a means to prevent server overloads by limiting the maximum amount of elements returned in a single page.

Application and Request have been extended with setters for page size limits. Set limits using the newly introduced PageLimit type.

// Set page size limit for the current request. Default is `nil`, which means no limit. 
request.fluent.pagination.pageSizeLimit = 3

// Setting the request-level limit to `nil` will cause the application-level limit to be used instead. 
request.fluent.pagination.pageSizeLimit = nil

// Use `.noLimit` if you intend to override a limit set on application level. 
request.fluent.pagination.pageSizeLimit = .noLimit

// Set application-wide page size limit. Default is `nil`, which means no limit. 
application.fluent.pagination.pageSizeLimit = 3

This PR depends on: vapor/fluent-kit#412

Add cache protocol

21 Feb 20:14
4004e92
Compare
Choose a tag to compare
This patch was authored and released by @tanner0101.

Add Fluent implementation for Vapor's new cache protocol: vapor/vapor#2558

app.caches.use(.fluent)
// Or with specific database id
app.caches.use(.fluent(.foo))

Make sure to add the CacheEntry migration (similar to SessionRecord).

app.migrations.add(CacheEntry.migration)

Add default implementation for CredentialsAuthenticatable

08 Dec 09:56
855cd81
Compare
Choose a tag to compare
This patch was authored and released by @0xTim.

Improves the experience for users writing web applications. Adds a ModelCredentialsAuthenticator to automatically conform Model types to CredentialsAuthenticatable and provide a middleware to use.

This can be used when logging in users via a web form, as shown in the tests. This also backfills some tests for ModelSessionAuthenticatable.

Also fixes a bug where the SessionAuthenticator was not using the provided DatabaseID

Resolves #710
Resolves #701

Docs here vapor/docs#576

Fluent 4.0.0

Adds the ability to retrieve query history

04 Jun 17:10
55f47ca
Compare
Choose a tag to compare
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

29 May 21:45
f97d9ed
Compare
Choose a tag to compare
FluentKit 1.0.0 GM Pre-release
Pre-release
This patch was authored and released by @tanner0101.

Updates this package for compatibility with latest version of FluentKit.

Add unique index to SessionRecord key

01 May 14:39
dba22d5
Compare
Choose a tag to compare
Pre-release
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

16 Apr 16:17
a5916ec
Compare
Choose a tag to compare
This patch was authored by @0xTim and released by @tanner0101.

Fixes incorrect rename deprecation for ModelTokenAuthenticatable (#677).

Update to Vapor 4 GM

09 Apr 18:08
4401a7e
Compare
Choose a tag to compare
Update to Vapor 4 GM Pre-release
Pre-release
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

01 Mar 22:10
Compare
Choose a tag to compare
Release Candidate 1 Pre-release
Pre-release

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.