From e0f32fb48caf9397ac87fdd6c6597d888f9a8a40 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 7 Jul 2024 15:20:11 +0530 Subject: api/dns: init --- db/query.sql | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'db/query.sql') diff --git a/db/query.sql b/db/query.sql index 9ba172f..f4b17dd 100644 --- a/db/query.sql +++ b/db/query.sql @@ -6,8 +6,7 @@ INSERT INTO Usage ( ); -- name: GetUsage :one -SELECT SUM(Ingress) AS Ingress, SUM(Egress) AS Egress -FROM Usage; +SELECT SUM(Ingress) AS Ingress, SUM(Egress) AS Egress FROM Usage; -- name: EnterDnsBlackList :exec INSERT INTO DnsBlackList ( @@ -16,6 +15,9 @@ INSERT INTO DnsBlackList ( $1 ); +-- name: DeleteDnsBlackList :exec +DELETE FROM DnsBlackList +WHERE Name = $1; + -- name: GetDnsBlackList :many -SELECT * -FROM DnsBlackList; +SELECT * FROM DnsBlackList; -- cgit v1.2.3