fluent

Vapor ORM (queries, models, and relations) for NoSQL and SQL databases

MIT License

Stars
1.3K
Committers
70

Bot releases are visible (Hide)

fluent - 4.10.0 - Fix up Fluent provider for Sendable-correct FluentKit Latest Release

Published by penny-for-vapor[bot] 6 months ago

What's Changed

Fix up Fluent provider for Sendable-correct FluentKit by @gwynne in #774

Updates the Fluent provider for the 1.48.0 release of FluentKit, which adds mostly-complete Sendable-correctness. Also bumps minimum Swift version to 5.8, matching FluentKit.

Reviewers

Thanks to the reviewers for their help:

  • @MahdiBM
This patch was released by @gwynne

Full Changelog: https://github.com/vapor/fluent/compare/4.9.0...4.10.0

fluent - 4.9.0 - Asyncification of Fluent provider

Published by penny-for-vapor[bot] 9 months ago

What's Changed

Asyncification of Fluent provider by @gwynne in #772

Updates the Fluent provider package to be (mostly) Sendable-correct and switches MigrateCommand to being async to avoid dangerous misuse of EventLoopFuture.wait().

Bumps minimum Swift version to 5.7 (matching Vapor).

This patch was released by @gwynne

Full Changelog: https://github.com/vapor/fluent/compare/4.8.0...4.9.0

fluent - Update min Swift version to 5.6 and make platform versions consistent

Published by VaporBot over 1 year ago

This patch was authored and released by @gwynne.
fluent - Update to match FluentKit's declared version minimums

Published by VaporBot over 1 year ago

This patch was authored and released by @gwynne.

This should help fix building in Xcode.

Also bumps minimum Swift version to 5.5.2 and removes outdated compiler conditionals on concurrency support, incidentally enabling back-deployment in the process.

fluent - Add migrationLogLevel configuration

Published by VaporBot over 1 year ago

This patch was authored by @madsodgaard and released by @gwynne.

Adds the possibility to configure the log level for migrations with:

app.fluent.migrationLogLeveL = .debug
fluent - Update minimum Swift version to 5.5

Published by VaporBot almost 2 years ago

This patch was authored and released by @gwynne.

Also updates very ancient CI.

fluent - Add `asyncCredentialsAuthenticator` to `ModelCredentialsAuthenticatable`

Published by VaporBot about 2 years ago

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

Adds asyncCredentialsAuthenticator to ModelCredentialsAuthenticatable to allow it to be overridden if needs be

fluent - Add support for async/await

Published by VaporBot almost 3 years ago

This patch was authored and released by @0xTim.

Adds initial support for async/await

fluent - Fix conditional Codable conformance

Published by VaporBot over 3 years ago

This patch was authored and released by @siemensikkema.

This fixes an issue introduced in https://github.com/vapor/fluent-kit/pull/435 where Page does not automatically conform to Codable anymore (#730)

fluent - Add page size limit

Published by VaporBot over 3 years ago

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: https://github.com/vapor/fluent-kit/pull/412

fluent - Add cache protocol

Published by tanner0101 over 3 years ago

This patch was authored and released by @tanner0101.

Add Fluent implementation for Vapor's new cache protocol: https://github.com/vapor/vapor/pull/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)
fluent - Add default implementation for CredentialsAuthenticatable

Published by tanner0101 almost 4 years ago

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 - Adds the ability to retrieve query history

Published by tanner0101 over 4 years ago

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
fluent - FluentKit 1.0.0 GM

Published by tanner0101 over 4 years ago

This patch was authored and released by @tanner0101.

Updates this package for compatibility with latest version of FluentKit.

fluent - Add unique index to SessionRecord key

Published by tanner0101 over 4 years ago

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.

fluent - Fix deprecated renamed fix for ModelTokenAuthenticatable

Published by tanner0101 over 4 years ago

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

Fixes incorrect rename deprecation for ModelTokenAuthenticatable (#677).

fluent - Update to Vapor 4 GM

Published by tanner0101 over 4 years ago

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.
fluent - Release Candidate 1

Published by tanner0101 over 4 years ago

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 - Fluent Beta 3

Published by tanner0101 over 4 years ago

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