aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorsoshial <soshial@gmail.com>2021-09-10 09:22:55 +0200
committersoshial <soshial@gmail.com>2021-09-10 09:22:55 +0200
commit2a5bf04563ecc8b09f07a0007335bbd111f9c0a2 (patch)
tree0d4b074c4d73f436f89411ed4f12abac3f39fbe4 /setup
parentf2c949998733734543be2ec795b2aa9b909b0044 (diff)
downloadtraccar-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.tar.gz
traccar-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.tar.bz2
traccar-server-2a5bf04563ecc8b09f07a0007335bbd111f9c0a2.zip
add support for relative filtering
Diffstat (limited to 'setup')
-rw-r--r--setup/default.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/setup/default.xml b/setup/default.xml
index 0564182c7..e798fcf88 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -22,6 +22,7 @@
<entry key='filter.enable'>true</entry>
<entry key='filter.future'>86400</entry>
+ <entry key='filter.relative'>false</entry>
<entry key='event.ignoreDuplicateAlerts'>true</entry>
<entry key='processing.computedAttributes.enable'>true</entry>
@@ -48,6 +49,18 @@
SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime
</entry>
+ <entry key='database.selectPositionByTime'>
+ SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime = :time LIMIT 1
+ </entry>
+
+ <entry key='database.selectPrevPosition'>
+ SELECT * FROM tc_positions WHERE deviceId = :deviceId AND NOT fixTime lt :time LIMIT 1 ORDER BY fixTime DESC
+ </entry>
+
+ <entry key='database.selectNextPosition'>
+ SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime gt :time LIMIT 1 ORDER BY fixTime ASC
+ </entry>
+
<entry key='database.selectLatestPositions'>
SELECT tc_positions.* FROM tc_positions INNER JOIN tc_devices ON tc_positions.id = tc_devices.positionid;
</entry>