Bot releases are visible (Hide)
Published by penny-for-vapor[bot] 6 months ago
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
Published by penny-for-vapor[bot] 9 months ago
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
Published by VaporBot over 1 year ago
Published by VaporBot over 1 year ago
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.
Published by VaporBot over 1 year ago
Adds the possibility to configure the log level for migrations with:
app.fluent.migrationLogLeveL = .debug
Published by VaporBot almost 2 years ago
Also updates very ancient CI.
Published by VaporBot about 2 years ago
Adds asyncCredentialsAuthenticator
to ModelCredentialsAuthenticatable
to allow it to be overridden if needs be
Published by VaporBot almost 3 years ago
Adds initial support for async/await
Published by VaporBot over 3 years ago
This fixes an issue introduced in https://github.com/vapor/fluent-kit/pull/435 where Page
does not automatically conform to Codable
anymore (#730)
Published by VaporBot over 3 years ago
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
Published by tanner0101 over 3 years ago
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)
Published by tanner0101 almost 4 years ago
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
Published by tanner0101 over 4 years ago
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
Published by tanner0101 over 4 years ago
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
Published by tanner0101 over 4 years ago
Updates this package for compatibility with latest version of FluentKit.
Published by tanner0101 over 4 years ago
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.
Published by tanner0101 over 4 years ago
Fixes incorrect rename deprecation for ModelTokenAuthenticatable
(#677).
Published by tanner0101 over 4 years ago
Updated for final Vapor 4.0.0 release (#672).
ModelUser
renamed to ModelAuthenticatable
.ModelUserToken
renamed to ModelTokenAuthenticatable
.- app.fluent.sessions.middleware()
+ User.sessionAuthenticator()
ModelSessionAuthenticatable
helper protocol added.Session
renamed to SessionRecord
. Now uses _fluent_sessions
schema.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.
Published by tanner0101 over 4 years ago