PKGBUILD/pkg/repository/db/postgres/selectSensor.sql
Markus Pesch 0fc4aa7c28
fix: postgres columns with timezone
Add timezone for the columns creation_date and update_date, otherwise
it's difficult to compare the times correctly in the unit test.

Furthermore the default value of the creation_date will now be defined
by the postgres implementation of the database interface.
2020-10-07 23:38:27 +02:00

20 lines
266 B
SQL

SELECT
sensor_id,
sensor_name,
sensor_location,
wire_id,
i2c_bus,
i2c_address,
gpio_number,
sensor_model,
sensor_enabled,
tick_duration,
device_id,
creation_date,
update_date
FROM
sensors
WHERE
sensor_id = $1
ORDER BY
sensor_name ASC;