Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
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.
Thanks to the reviewers for their help:
Full Changelog: https://github.com/vapor/fluent/compare/4.9.0...4.10.0
Asyncification of Fluent provider by @gwynne in #772
Updates the Fluent provider package to be (mostly)
Sendable
-correct and switchesMigrateCommand
to being async to avoid dangerous misuse ofEventLoopFuture.wait()
.Bumps minimum Swift version to 5.7 (matching Vapor).
Full Changelog: https://github.com/vapor/fluent/compare/4.8.0...4.9.0
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.
Adds the possibility to configure the log level for migrations with:
app.fluent.migrationLogLeveL = .debug
Also updates very ancient CI.
Adds asyncCredentialsAuthenticator
to ModelCredentialsAuthenticatable
to allow it to be overridden if needs be
Adds initial support for async/await
This fixes an issue introduced in https://github.com/vapor/fluent-kit/pull/435 where Page
does not automatically conform to Codable
anymore (#730)
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