diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 18:27:33 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 18:27:33 +1300 |
commit | ccd10d6ee510c72b583fae8e302ed6c44574d5b1 (patch) | |
tree | a9427c6938552e0ba6ed53d3097902dd79cd1787 /src/org/traccar/database | |
parent | 3c5293cd078149a81cfdd21878e7731d56b2830c (diff) | |
download | traccar-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.tar.gz traccar-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.tar.bz2 traccar-server-ccd10d6ee510c72b583fae8e302ed6c44574d5b1.zip |
Implement statistics API call
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r-- | src/org/traccar/database/DataManager.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 6718bda83..58d16d7f5 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -474,8 +474,10 @@ public class DataManager { .executeUpdate(); } - public Collection<Statistics> getStatistics() throws SQLException { + public Collection<Statistics> getStatistics(Date from, Date to) throws SQLException { return QueryBuilder.create(dataSource, getQuery("database.selectStatistics")) + .setDate("from", from) + .setDate("to", to) .executeQuery(Statistics.class); } |