summaryrefslogblamecommitdiff
path: root/db/query.sql.go
blob: de68384293ec0a90b9c46794ee335bb11a102c72 (plain) (tree)






































                                                                               
// 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
}