-
Notifications
You must be signed in to change notification settings - Fork 2
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
Initial query implementation #32
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very cool & I'm looking forward to being able to write more complex queries! I left some style feedback.
if string.len() < 2 || chars.next() != Some('"') || chars.last() != Some('"') { | ||
None? | ||
} | ||
let inner = &string[1..string.len() - 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, you could also use str::trim_matches
here, though just slicing the string is probably faster, as it doesn't require a char comparison.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The literal/string handling is questionable at best anyways (e.g. doesn't handle escaping), i plan to follow up with the group_by implementation, as it will implement support for the remaining literals, bool, num, and debug.
Based on #29
Implements a query view + very basic dsl
I've stripped some things out, like span / filter view to get the PR up, we can always add them later on!
It doesn't have nice error messages yet, the buffer will just get cleared and no filter is applied, i will create a follow up issue.
It supports history, via ↑ and ↓
Syntax:
event.field.<message> [== | contains | matches | starts_with] "<value>"
Closes #5, #6, #7