blob: 624442f4d21b5d152584f204f93d29f7022aa1f3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-- name: EnterUsage :exec
INSERT INTO Usage (
HardwareAddr, StartTime, StopTime, Egress, Ingress
) VALUES (
$1, $2, $3, $4, $5
);
-- name: GetUsage :one
SELECT SUM(Ingress) AS Ingress, SUM(Egress) AS Egress FROM Usage;
-- name: EnterDnsBlackList :exec
INSERT INTO DnsBlackList (
Name
) VALUES (
$1
);
-- name: DeleteDnsBlackList :exec
DELETE FROM DnsBlackList
WHERE Name = $1;
-- name: GetDnsBlackList :many
SELECT * FROM DnsBlackList;
-- name: EnterMacBlackList :exec
INSERT INTO MacBlackList (
HardwareAddr
) VALUES (
$1
);
-- name: DeleteMacBlackList :exec
DELETE FROM MacBlackList
WHERE HardwareAddr = $1;
-- name: GetMacBlackList :many
SELECT * FROM MacBlackList;
|