PKGBUILD/pkg/repository/sqlite3/dml/insertOrUpdateTemperature.sql

16 lines
281 B
MySQL
Raw Permalink Normal View History

INSERT INTO temperatures (
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 = date('now');