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

CP-52881: add mechanism to filter out event fields #6184

Draft
wants to merge 1 commit into
base: feature/perf
Choose a base branch
from

Conversation

edwintorok
Copy link
Contributor

We should also add a similar mechanism to get_all_records.

A better fix might be to change the type of the field to a ref and move it out to a class of its own and do a DB upgrade.

It might be better to do this at the DB action level when generating get_record, although we need to ensure we don't lose these values completely: we do need to retain them when saving the XAPI DB.

We should really have an Event.from_filtered API too that allows the client to define a field filter.

We should also add a similar mechanism to get_all_records.

A better fix might be to change the type of the field to a ref and move it out to a class of its own
and do a DB upgrade.

Signed-off-by: Edwin Török <[email protected]>
let apply_event_filter = function
| Rpc.Dict lst as orig ->
let lst' = maybe_map_fields lst in
if lst' == lst then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a comment that == is indeed what we want.

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.

2 participants