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

Provide extra configuration #21

Merged
merged 7 commits into from
Jun 29, 2020
Merged

Provide extra configuration #21

merged 7 commits into from
Jun 29, 2020

Conversation

albertored
Copy link
Collaborator

These configuration options are now available:

  • :ignore_errors - when true recoverable errors are ignored. Recoverable errors include for instance missing attribute or missing predicate, in that case the query is returned without taking into account the filter causing the error. Defaults to true

  • :max_depth - the maximum level of nested relations that can be queried. Defaults to :full meaning no limit

  • :only_predicates - a list of allowed predicates. The list can contain :basic and :composite, in that case all corresponding predicates are added to the list. When not given or when nil no limit is applied. Defaults to nil

  • :except_predicates - a list of excluded predicates. The list can contain :basic and :composite, in that case all correpsonding predicates are added to the list. When not given or when nil no limit is applied. If both :only_predicates and :except_predicates are given :only_predicates takes precedence and :except_predicates is ignored. Defaults to nil

In addition a new ExSieve.Schema module allows to override these options on a per-schema basis. One can also set some schema fields as non filterable with the @ex_sieve_not_filterable_fields module attribute.

@albertored albertored self-assigned this Jun 26, 2020
@albertored albertored merged commit 439f8b1 into master Jun 29, 2020
@albertored albertored deleted the extra-config branch June 29, 2020 08:59
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