markus
522fe2746a
Add additional functions to the repository to add or update devices, sensors or measured values. Furthermore the test has been adapt to the new functions.
14 lines
282 B
SQL
14 lines
282 B
SQL
INSERT INTO devices (
|
|
device_id,
|
|
device_name,
|
|
device_location,
|
|
creation_date,
|
|
update_date
|
|
)
|
|
VALUES ($1, $2, $3, $4, $5)
|
|
ON CONFLICT (device_id)
|
|
DO
|
|
UPDATE SET
|
|
device_name = EXCLUDED.device_name,
|
|
device_location = EXCLUDED.device_location,
|
|
update_date = NOW(); |