Skip to content

Conversation

@RKrahl
Copy link
Member

@RKrahl RKrahl commented Jul 10, 2021

Add an argument join_specs to the constructor of class Query that allows to override the join specification to be used in the created query for selected related objects. Do not emit QueryNullableOrderWarning or QueryOneToManyOrderWarning if the concerned relation is in join_specs. This has been discussed in #84.

Draft, still missing:

  • documentation
  • tests

RKrahl added 3 commits July 9, 2021 14:00
The next version is therefore expected to be 1.19.0.
argument for validity.  Document the join_specs argument in the
Query() constructor.
@RKrahl RKrahl added the enhancement New feature or request label Jul 10, 2021
@RKrahl RKrahl added this to the 0.19.0 milestone Jul 10, 2021
@MRichards99
Copy link
Contributor

Apologies for the delay in responding, I've been on leave for the past few days. This looks like a good solution to give users the option to use different joins.

I can see how I can implement this into DataGateway API - I'd use the setJoinSpecs() function directly rather than passing an argument in the query's constructor, but it's good to have both options. I believe the join keywords you've listed are the only ones that work - I couldn't get any others to work when I was testing before.

Let me know once you've finished with the branch and I'll test/implement it onto DataGateway.

@MRichards99
Copy link
Contributor

I had a chance to test this for DataGateway's use case (I implemented the join specification changes into DataGateway API and then tested on the frontend) and I'm happy this works well for us.

@RKrahl RKrahl marked this pull request as ready for review July 20, 2021 10:14
@RKrahl RKrahl merged commit e15324c into release/0.19.0 Jul 20, 2021
@RKrahl RKrahl deleted the join_specs branch July 20, 2021 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants