cube icon indicating copy to clipboard operation
cube copied to clipboard

Grammar update: lock expression

Open jkassemi opened this issue 11 years ago • 3 comments

Hey folks, not sure if there's any interest, but figured I'd pass this along. Adds the ability to limit an expression by appending a filter expression to the end of a metric or event expression.

This allows us to create an interface to the Cube evaluator and still allow the client to provide the initial expression. Our application just needs to append the lock expression before forwarding to our (well secured) evaluator.

Feedback's awesome, this is one of my very few forays into node.

jkassemi avatar Oct 16 '13 23:10 jkassemi

That seems like a nice addition, but that wouldn't work very well with multiple operations. I like the idea but I'm not sure it's the best way to express constraints, though I have nothing better to offer yet :)

Marsup avatar Oct 17 '13 12:10 Marsup

I considered adding additional parameters to the request - so the event and metric getters would then filter based on those parameters. This turned out much cleaner - got some samples of multiple operations that you use that could get my head working through some possibilities?

jkassemi avatar Oct 21 '13 20:10 jkassemi

A meaningless example would be sum(test.gt(i, 42)) + min(test2.lt(i, 24)) but you get the idea.

Marsup avatar Oct 21 '13 21:10 Marsup