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.
16 lines
272 B
SQL
16 lines
272 B
SQL
INSERT INTO pressures (
|
|
id,
|
|
value,
|
|
date,
|
|
sensor_id,
|
|
creation_date,
|
|
update_date
|
|
)
|
|
VALUES ($1, $2, $3, $4, $5, $6)
|
|
ON CONFLICT (id)
|
|
DO
|
|
UPDATE SET
|
|
value = EXCLUDED.value,
|
|
date = EXCLUDED.date,
|
|
sensor_id = EXCLUDED.sensor_id,
|
|
update_date = NOW(); |