diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-12-27 10:21:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 10:21:19 -0800 |
commit | 790db6295f130e64c8346f13985dd0c15f938b40 (patch) | |
tree | 3fdb5bfc3bdb695bc29bde4105f22ac2da41e9cd /src/main/java/org/traccar/database | |
parent | 19f170b8c147935c8df4044a4fa3b6456baad6c7 (diff) | |
parent | 41453ca2ee76372a031ea206c264c1c7cde58ee6 (diff) | |
download | trackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.tar.gz trackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.tar.bz2 trackermap-server-790db6295f130e64c8346f13985dd0c15f938b40.zip |
Merge pull request #4740 from soshial/relative_filtering
Add support for relative filtering
Diffstat (limited to 'src/main/java/org/traccar/database')
-rw-r--r-- | src/main/java/org/traccar/database/DataManager.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/database/DataManager.java b/src/main/java/org/traccar/database/DataManager.java index 00c802fde..ebd0dcade 100644 --- a/src/main/java/org/traccar/database/DataManager.java +++ b/src/main/java/org/traccar/database/DataManager.java @@ -333,6 +333,13 @@ public class DataManager { .executeQuery(Position.class); } + public Position getPrecedingPosition(long deviceId, Date date) throws SQLException { + return QueryBuilder.create(dataSource, getQuery("database.selectPrecedingPosition")) + .setLong("deviceId", deviceId) + .setDate("time", date) + .executeQuerySingle(Position.class); + } + public void updateLatestPosition(Position position) throws SQLException { QueryBuilder.create(dataSource, getQuery("database.updateLatestPosition")) .setDate("now", new Date()) |