Skip to content
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

Expose table name and full-text filtering methods to DerivableRequest #576

Merged
merged 13 commits into from
Jul 28, 2019

Conversation

groue
Copy link
Owner

@groue groue commented Jul 27, 2019

This PR appends the TableRequest protocol to the requirements of the DerivableRequest protocol.

This enhances the expressivity of DerivableRequest and associations:

  • Constrained extensions to DerivableRequest can now use filter(key:), filter(keys:), orderByPrimaryKey(), etc

  • Associations and constrained extensions to DerivableRequest can now use the full-text methods matching(_:).

The inspiration for this change comes from https://github.com/openbitapp/GRDB.swift. Thank you @robcas3!


Strictly speaking, this PR introduces breaking changes to both the experimental protocols Association and DerivableRequest:

  • Association now requires that its origin and destination associated types conform to the TableRecord protocol.

  • DerivableRequest now requires TableRequest conformance.

Those breaking changes should be harmess: it is highly unlikely any GRDB user defines custom types based on those protocols.

@groue groue added this to the GRDB 4.2.0 milestone Jul 27, 2019
@groue groue merged commit 82c8958 into development Jul 28, 2019
@groue groue deleted the dev/fullltext branch July 28, 2019 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant