mirror of
https://github.com/Kyren223/eko.git
synced 2026-07-15 08:10:29 +00:00
Added session duration metrics with device analytics along with device
analytics metrics in the DB to aggregate and DeviceID abuse prevention
This commit is contained in:
11
query/device_analytics.sql
Normal file
11
query/device_analytics.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- name: SetDeviceAnalytics :one
|
||||
INSERT INTO device_analytics (
|
||||
device_id, os, arch, term, colorterm
|
||||
) VALUES (
|
||||
@device_id, @os, @arch, @term, @colorterm
|
||||
)
|
||||
ON CONFLICT DO
|
||||
UPDATE SET
|
||||
os = EXCLUDED.os, arch = EXCLUDED.arch, term = EXCLUDED.term, colorterm = EXCLUDED.colorterm
|
||||
WHERE device_id = EXCLUDED.device_id
|
||||
RETURNING *;
|
||||
Reference in New Issue
Block a user