Skip to content

Add specification of shouldFilterTopLevel (join type) to ReferenceAttribute #51

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 2 commits into from
Oct 19, 2022

Conversation

acupofjose
Copy link
Contributor

Ref #50.

Adds embedType as constructor parameter for ReferenceAttribute with the default to EmbedQueryType.Inner to match current API expectations.

Example:

[Reference(typeof(Person), embedType: EmbedQueryType.Standard)]
public List<Person> Persons { get; set; }

Setting EmbedQueryType.Standard will remove Top Level Filtering from returned results.

See: https://postgrest.org/en/stable/api.html#embedded-filters

@acupofjose
Copy link
Contributor Author

acupofjose commented Oct 19, 2022

Update: As there are only two options, switch to boolean instead of enum: ShouldFilterTopLevel which defaults to true

Example:

[Reference(typeof(Person), shouldFilterTopLevel: false)]
public List<Person> Persons { get; set; }

@acupofjose acupofjose merged commit f511806 into master Oct 19, 2022
@acupofjose acupofjose deleted the dev/add-embed-type-to-resource-attribute branch October 19, 2022 12:22
@acupofjose acupofjose changed the title Add specification of EmbedType (join type) to ReferenceAttribute Add specification of shouldFilterTopLevel (join type) to ReferenceAttribute Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant