Teekanne / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

PersistenceExtensions change to support date range query #418

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Feature Description
Add method "getAllStatesBetweenTimes" to the class PersistenceExtensions to 
allow a date range query. Current methods only allow return of data FROM a time 
up to the current time.

2. Example Use Case
This enables a REST interface to be produced that supports historical queries 
and charting of data.

The implementation already implemented in the link below provides two methods - 
one using the default provider, and one using a named provider. This is 
consistent with other methods in this class.

https://code.google.com/r/chris-openhab/source/browse/bundles/core/org.openhab.c
ore.persistence/src/main/java/org/openhab/core/persistence/extensions/Persistenc
eExtensions.java?spec=svn067bdf160a6a0e51a33651a56069d0ad711be60a&r=067bdf160a6a
0e51a33651a56069d0ad711be60a

Original issue reported on code.google.com by ch...@cd-jackson.com on 22 Aug 2013 at 12:17

GoogleCodeExporter commented 9 years ago
As you have implemented the rest interface in a way that it directly accesses 
the persistence services, I think we won't need this feature anymore. Using it 
in rules might rather be a bit complex (and that's what the extensions are 
meant for).

Original comment by kai.openhab on 8 Dec 2013 at 8:00