cube icon indicating copy to clipboard operation
cube copied to clipboard

Solution to #60

Open mmmulani opened this issue 13 years ago • 8 comments

Add a parameter to /event/get to toggle retrieving all event data. The parameter is "allData" and when present, all fields of the event are returned regardless of what is specified. (i.e. the query "expression=server(cpu)&allData" will return all fields)

While this creates another parameter rather than allowing a query like "server(*)", it is explicit in that it is a switch to return all data.

mmmulani avatar Jul 07 '12 16:07 mmmulani

Related #60.

I would rather this be implemented as a wildcard operator, rather than adding a new query parameter.

mbostock avatar Jul 08 '12 17:07 mbostock

Yeah that would be nicer, I'll try hacking it out today.

My idea is to only allow "type()" rather than also allow "type(prop.)" since that can be queried by "type(prop)"

mmmulani avatar Jul 09 '12 17:07 mmmulani

Yes, I agree: type(*). You can already get type(prop.*) by saying type(prop).

mbostock avatar Jul 09 '12 18:07 mbostock

Sorry about the huge size, that's from me regenerating the grammar with pegjs.

I had to reorder the grammar rules, looks like pegjs eagerly fails as soon as it starts matching a subrule in the grammar.

mmmulani avatar Jul 09 '12 20:07 mmmulani

Why not just have a query like "event" return all data for all events called "event"?

edmund-huber avatar Jul 24 '12 20:07 edmund-huber

@edmund-huber there is definitely value in the knowledge that an event simply occurred (and overhead in sending down/calculating all those properties) having "type" return all data for all events called "type" also makes "sum(type)" confusing as it doesn't act on any of the properties.

mmmulani avatar Jul 25 '12 02:07 mmmulani

Right, we want the event expression "event" to only return the event times—it's an existence check.

mbostock avatar Jul 25 '12 02:07 mbostock

@mbostock how does this diff look? seems to work for me..

mmmulani avatar Jul 25 '12 14:07 mmmulani