[server/fetch-data] Omit send device location information

This commit is contained in:
Starbeamrainbowlabs 2019-04-16 17:40:32 +01:00
parent 1164d5bf1b
commit 530876ab5f
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -62,18 +62,9 @@ class MariaDBMeasurementDataRepository implements IMeasurementDataRepository {
{$s("table_name_metadata")}.{$s("column_metadata_recordedon")}, {$s("table_name_metadata")}.{$s("column_metadata_recordedon")},
{$s("table_name_metadata")}.{$s("column_metadata_storedon")} {$s("table_name_metadata")}.{$s("column_metadata_storedon")}
) AS datetime, ) AS datetime,
COALESCE(
{$s("table_name_metadata")}.{$s("column_metadata_lat")},
{$o(MariaDBDeviceRepository::class, "table_name")}.{$o(MariaDBDeviceRepository::class, "column_lat")}
) AS latitude,
COALESCE(
{$s("table_name_metadata")}.{$s("column_metadata_long")},
{$o(MariaDBDeviceRepository::class, "table_name")}.{$o(MariaDBDeviceRepository::class, "column_long")}
) AS longitude,
COUNT({$s("table_name_metadata")}.{$s("column_metadata_device_id")}) AS record_count COUNT({$s("table_name_metadata")}.{$s("column_metadata_device_id")}) AS record_count
FROM {$s("table_name_values")} FROM {$s("table_name_values")}
JOIN {$s("table_name_metadata")} ON {$s("table_name_values")}.{$s("column_values_reading_id")} = {$s("table_name_metadata")}.id JOIN {$s("table_name_metadata")} ON {$s("table_name_values")}.{$s("column_values_reading_id")} = {$s("table_name_metadata")}.id
JOIN {$o(MariaDBDeviceRepository::class, "table_name")} ON {$s("table_name_metadata")}.{$s("column_metadata_device_id")} = {$o(MariaDBDeviceRepository::class, "table_name")}.{$o(MariaDBDeviceRepository::class, "column_device_id")}
WHERE ABS(TIME_TO_SEC(TIMEDIFF( WHERE ABS(TIME_TO_SEC(TIMEDIFF(
:datetime, :datetime,
COALESCE( COALESCE(