summaryrefslogtreecommitdiff
path: root/db/query.sql.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/query.sql.go')
-rw-r--r--db/query.sql.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/db/query.sql.go b/db/query.sql.go
new file mode 100644
index 0000000..de68384
--- /dev/null
+++ b/db/query.sql.go
@@ -0,0 +1,39 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+// sqlc v1.26.0
+// source: query.sql
+
+package db
+
+import (
+ "context"
+
+ "github.com/jackc/pgx/v5/pgtype"
+)
+
+const enterUsage = `-- name: EnterUsage :exec
+INSERT INTO Usage (
+ HardwareAddr, StartTime, StopTime, Egress, Ingress
+) VALUES (
+ $1, $2, $3, $4, $5
+)
+`
+
+type EnterUsageParams struct {
+ Hardwareaddr int32
+ Starttime pgtype.Timestamp
+ Stoptime pgtype.Timestamp
+ Egress int32
+ Ingress int32
+}
+
+func (q *Queries) EnterUsage(ctx context.Context, arg EnterUsageParams) error {
+ _, err := q.db.Exec(ctx, enterUsage,
+ arg.Hardwareaddr,
+ arg.Starttime,
+ arg.Stoptime,
+ arg.Egress,
+ arg.Ingress,
+ )
+ return err
+}