Releases: vapor/fluent
Releases · vapor/fluent
Fluent 3.0.0 RC 2.3.2
3.0.0-rc.2.3.2 add new routing static method
Fluent 3.0.0 RC 2.3.1
3.0.0-rc.2.3.1 temporary reflect property fix
Fluent 3.0.0 RC 2.3
New:
- Added the ability to specify custom names for migrations. This is useful for situations where you are using two models from separate modules with identical names.
migrationConfig.add(migration: Foo.self, database: .sqlite name: "foo")
- Added support for
CountableClosedRange
Fixed:
- Fixed an issue where
SchemaUpdater
would use.create
action. - Added a benchmark test to ensure drivers can save
nil
values properly.
Milestone:
3.0.0-rc.2.3
Fluent 3.0.0 RC 2.2.1
Fixed:
RevertCommand
usesconsole.confirm(_:)
now when reverting migrations. This allows for-y, --yes
and-n, --no
flags to be passed to automatically answer these prompts.- Deprecated
filter(_:in:)
andfilter(_:notIn:)
in favor of using the~~
and!~
operators. This allows subset queries to match Fluent's other query types more closely going forward.
Milestone:
3.0.0-rc.2.2.1
Fluent 3.0.0 RC 2.2
New:
- Added
RevertCommand
that can be used to revert migrations.
var commandConfig = CommandConfig.default()
commandConfig.use(RevertCommand.self, as: "revert")
services.register(commandConfig)
swift run Run revert
- Added
group(by:)
method toQueryBuilder
. - Added
~~
and!~
operators for in and not-in subset filters. This applies to databases whose query filter types areDataPredicateRepresentable
(the SQL-like dbs).
query.filter(\.name ~~ ["Foo", "Bar", "Baz"]) // name in (Foo, Bar, Baz)
- Changed pivot table name connector from
+
to_
. There is now a global stored property to change this connector:Fluent.pivotNameConnector
connection
property ofQueryBuilder
is now public.Async
module is now exported by default withFluent
.
API Docs:
https://api.vapor.codes/fluent/3.0.0-rc.2.2/Fluent/
https://api.vapor.codes/fluent/3.0.0-rc.2.2/FluentSQL/
Milestone:
3.0.0-rc.2.2
Fluent 3.0.0 RC 2.1.2
3.0.0-rc.2.1.2 fix deprecation for reflectProperty
Fluent 3.0.0 RC 2.1.1
3.0.0-rc.2.1.1 move to LosslessStringConvertible
Fluent 3.0.0 RC 2.1
Fixed:
- Fixes an issue where commands that span multiple db queries (like
.save()
with "insert" and "select last id" queries) could run out of order.
Fluent 3.0.0 RC 2
New:
- Vapor is now running on Swift NIO!
- Fluent can now decode multiple distinct model types from a query.
let all = try A.query(on: conn)
.join(B.self, field: \.colb, to: \.cola)
.alsoDecode(B.self)
.join(C.self, field: \.colc, to: \.cola)
.alsoDecode(C.self)
.all()
print(all) // [(A, B) C)]
- improves flexility of
QuerySupporting
protocol. Drivers now declare custom data types and transmit those instead of generic codable packets. query.data
is now[QueryField: <Driver>Data]
query.update(["foo": "bar", "baz": 3.14])
to update multiple rows at once- Support for fetching more than one model from a query.
- Support for transforming a QueryBuilder's result stream. Query builder is now generic on two parameters: Model and Result.
- Support for decoding multiple models as nested tuples.
- Improved support for
~=
,~~
,=~
operators. - Improved
Timestampable
date precision.
Fixed:
- not in/in support.
- Fixed an issue where AND groups would use OR relation.
Fluent 3.0.0 RC 1.0.1
Fixed:
- Small fixes in FluentBenchmarker