summaryrefslogtreecommitdiff
path: root/db/query.sql.go
blob: de68384293ec0a90b9c46794ee335bb11a102c72 (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
38
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
}