-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FluentKit 1.0.0 GM #270
Merged
Merged
FluentKit 1.0.0 GM #270
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* unify field path structure for all drivers * cleanup files * rm dead code * nested group option * protocol cleanup + timestamp updates * updates
* Add tests for placeholder for dummy database * Fix placeholder position Placeholder position should start at 1, not 2. No need to add 1 to position. * Rename variable to result
Closed
Co-authored-by: Tanner <tannernelson@gmail.com>
Co-authored-by: Tanner <tannernelson@gmail.com>
This was referenced May 18, 2020
These changes are now available in 1.0.0-rc.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given the large number of fixes currently on the
gm
branch, I've decided to release them as a finalrc
version now. The official 1.0.0 will release will come as soon as the docs for Fluent are finished.Unify field key path semantics (#268).
Makes
FieldKey
path usage consistent across all db driver types. SQL no longer treats field key paths differently than NoSQL. This means@Group
now always serializes as a flat structure. Support for nested structures and dynamic structuring behavior between NoSQL and SQL will be added in the future with a more reliable design.Improve property protocols (#268).
FieldProtocol
andPropertyProtocol
have been cleaned up and split into more descriptive protocols:AnyProperty
AnyDatabaseProperty
AnyCodableProperty
AnyQueryableProperty
Property
QueryableProperty
Add
Database.inTransaction
(fixes #23, #119).Database drivers are expected to keep track of whether they are already in a transaction and not start a new one if they do not supported nested transactions. Users can check if the database they are using is currently in a transaction using the
inTransaction
flag.Fix issues filtering and setting
@OptionalField
whennil
(#270).@OptionalField.value
is now a double optional again. This was previously changed to avoid double optionals which can be tricky to work with, but a single optional does not accurately convey all states an@OptionalField
can be in:nil
: Uninitialized.some(nil)
: Initialized tonil
..some(.some)
: Initialized to a value.Furthermore,
@OptionalField
's associated value type being an optional is required for generic operators (like==
) and methods (likeset(_:to:)
to properly acceptnil
values.Add batch delete method on collection of models (#270, fixes #114).
A new method
delete(force:on:)
is now available on collections of models.Schema update constraints (#270, fixes #235).
Schema constraints can now be created and deleted during
SchemaBuilder.update()
.Add constraint names (#270, fixes #118).
New methods on
SchemaBuilder
are now available for naming unique and foreign key constraints.Constraints can now be deleted by name as well.
Arbitrary
join(_:on:)
ordering (#270, fixes #128).QueryBuilder.join
'son
parameter can now have fields appear on either side of==
.Add
EnumBuilder.read()
(#270, fixes #194).EnumBuilder
now supports reading the enum metadata outside ofcreate()
. This is useful for re-using enums between schemas.Improve readability of Codable errors (#270, fixes #231).
DecodingError
s thrown byModel
now include key path information.Several small bug and convenience API fixes (#270).