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

WIP: MongoDB-like Filtering #270

Closed
wants to merge 12 commits into from
Closed

WIP: MongoDB-like Filtering #270

wants to merge 12 commits into from

Conversation

lmangani
Copy link
Collaborator

@lmangani lmangani commented Dec 11, 2022

This PR adds an output post-processor plugin using the mongo-query-compiler library to offer additional result filtering capabilities. README included.

Usage:

mongo({$where: 'this.stream.event === "user"'}, {type="syslog"} | json )

Raw JS equivalent:

var streams = response.data.result
let logquery = {$where: 'this.stream.event === "user"'}
let logfilterer = compileMongoQuery(logquery);
let logresults = streams.filter(logfilterer);

Links:

Signed-off-by: Lorenzo Mangani <[email protected]>
Signed-off-by: Lorenzo Mangani <[email protected]>
Signed-off-by: Lorenzo Mangani <[email protected]>
Signed-off-by: Lorenzo Mangani <[email protected]>
@lmangani lmangani added help wanted Extra attention is needed experimental involves usage of experimental features needs testing labels Dec 11, 2022
@lmangani lmangani self-assigned this Dec 11, 2022
@lmangani lmangani marked this pull request as draft December 12, 2022 10:27
@lmangani lmangani changed the title MongoDB-like Filtering WIP: MongoDB-like Filtering Dec 13, 2022
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
mongo-query-compiler 1.0.5 eval +1 75.5 kB aptivator

@lmangani lmangani closed this Oct 26, 2023
@lmangani
Copy link
Collaborator Author

Archived

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental involves usage of experimental features help wanted Extra attention is needed needs testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant