aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-13 11:01:48 +1200
committerGitHub <noreply@github.com>2017-05-13 11:01:48 +1200
commit713d6c55a007aa80850810f447308976516bfa63 (patch)
tree057e9147e724a56b6e2f3820fcf3d9ab67561fdf /setup
parent51920cae6438f8888090f177761a82afff33067f (diff)
parent6c17f85d04b224ff2a09265918765c9f4fc8cf94 (diff)
downloadtraccar-server-713d6c55a007aa80850810f447308976516bfa63.tar.gz
traccar-server-713d6c55a007aa80850810f447308976516bfa63.tar.bz2
traccar-server-713d6c55a007aa80850810f447308976516bfa63.zip
Merge pull request #3156 from Abyss777/computed_attributes
Implement computed attributes
Diffstat (limited to 'setup')
-rw-r--r--setup/default.xml60
1 files changed, 60 insertions, 0 deletions
diff --git a/setup/default.xml b/setup/default.xml
index eed2584bd..146cba80b 100644
--- a/setup/default.xml
+++ b/setup/default.xml
@@ -18,6 +18,7 @@
<entry key='logger.file'>./logs/tracker-server.log</entry>
<entry key='event.enable'>true</entry>
+ <entry key='processing.computedAttributes.enable'>true</entry>
<!-- DATABASE CONFIG -->
@@ -368,6 +369,65 @@
DELETE FROM user_user WHERE userId = :userId AND managedUserId = :managedUserId
</entry>
+ <entry key='database.selectAttributes'>
+ SELECT * FROM attributes
+ </entry>
+
+ <entry key='database.insertAttribute'>
+ INSERT INTO attributes (description, type, attribute, expression)
+ VALUES (:description, :type, :attribute, :expression)
+ </entry>
+
+ <entry key='database.updateAttribute'>
+ UPDATE attributes SET
+ description = :description,
+ type = :type,
+ attribute = :attribute,
+ expression = :expression
+ WHERE id = :id
+ </entry>
+
+ <entry key='database.deleteAttribute'>
+ DELETE FROM attributes WHERE id = :id
+ </entry>
+
+ <entry key='database.selectAttributePermissions'>
+ SELECT userId, attributeId FROM user_attribute
+ </entry>
+
+ <entry key='database.linkAttribute'>
+ INSERT INTO user_attribute (userId, attributeId) VALUES (:userId, :attributeId)
+ </entry>
+
+ <entry key='database.unlinkAttribute'>
+ DELETE FROM user_attribute WHERE userId = :userId AND attributeId = :attributeId
+ </entry>
+
+ <entry key='database.selectGroupAttributes'>
+ SELECT groupId, attributeId FROM group_attribute
+ </entry>
+
+ <entry key='database.linkGroupAttribute'>
+ INSERT INTO group_attribute (groupId, attributeId) VALUES (:groupId, :attributeId)
+ </entry>
+
+ <entry key='database.unlinkGroupAttribute'>
+ DELETE FROM group_attribute WHERE groupId = :groupId AND attributeId = :attributeId
+ </entry>
+
+ <entry key='database.selectDeviceAttributes'>
+ SELECT deviceId, attributeId FROM device_attribute
+ </entry>
+
+ <entry key='database.linkDeviceAttribute'>
+ INSERT INTO device_attribute (deviceId, attributeId) VALUES (:deviceId, :attributeId)
+ </entry>
+
+ <entry key='database.unlinkDeviceAttribute'>
+ DELETE FROM device_attribute WHERE deviceId = :deviceId AND attributeId = :attributeId
+ </entry>
+
+
<!-- PROTOCOL CONFIG -->
<entry key='gps103.port'>5001</entry>