Skip to content

Instantly share code, notes, and snippets.

@jhiemer
Created June 12, 2013 09:17
Show Gist options
  • Save jhiemer/5763931 to your computer and use it in GitHub Desktop.
Save jhiemer/5763931 to your computer and use it in GitHub Desktop.
@Query("{ 'instanceId' : ?0, 'metric' : ?1, 'timestamp': {$gte: ?2, $lt: ?3}}")
List<MeasurementMinute> findByInstanceIdAndMetricAndTimestamp(@Param("instanceId") String instanceId,
@Param("metric") String metric, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
Created query { "instanceId" : "Mini-Ubuntu-4 (e1a19b46-ffab-43d1-997a-d5279b625853)" , "metric" : "net/packetsRx" , "timestamp" : { "$gte" : { "$date" : "2013-06-12T09:12:00.019Z"} , "$lt" : { "$date" : "2013-06-12T09:17:00.019Z"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment