-
-
Notifications
You must be signed in to change notification settings - Fork 757
Build request with closures #1759
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
Merged
Merged
Conversation
This file contains hidden or 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
507a715
to
02df897
Compare
Love the syntax 👏 |
a27cf10
to
c967436
Compare
so that we can use the new SQLExpressionBuilder
Don't use key paths in tests because they are Swift 6.1+ only
We now recommend: enum Columns { static let id = Column("id") static let title = Column("title") static let latitude = Column("latitude") static let longitude = Column("longitude") } Instead of the previous recommendation: enum Columns: String, ColumnExpression { case id, title, latitude, longitude } This is because SE-0438 does not support Metatype Keypaths for enums. A request like `Place.order(\.title)` does not compile with a String enum.
56b757c
to
4301413
Compare
f476807
to
fac0c22
Compare
d1f34c2
to
2316fb3
Compare
3454e40
to
034b241
Compare
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.
This pull request brings a new way to write query interface requests:
TODO:
enum Columns: String, ColumnExpression { ... }
: those do not support the key path syntax, because SE-0438 did not ship with support for enums. We now discourage those enums, because we don't know when the language will improve.alias[Foo.Columns.name]
can be replaced withalias.name