am struggling to name a function that counts events keyed by their type for a specific device (by id).
Suggestions for better names:
* countEventsByTypeByDevice
* getEventCountsByDevice
* getEventTypeCountsByDevice
gerEvents().countBy(some fn)
In reality, what this does is it does select sum(id) from events where type = 'error' So splitting in such a manner does not really help
What are the arguments to this function?
the id of a device. types are all provided within the function.
Ahh, right, it returns a table of types?
it returns an object keyed by the event type and with the value of amount of events for this type
yeah, that's what I meant heh, it's hard to say this
Обсуждают сегодня