// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.30.0
// source: snapshots.sql

package sqlc

import (
	"context"

	"github.com/jackc/pgx/v5/pgtype"
)

const insertSnapshot = `-- name: InsertSnapshot :exec
INSERT INTO snapshots (id, container_id, parent_snapshot_id, snapshotter, digest)
VALUES (
  $1,
  $2,
  $3,
  $4,
  $5
)
ON CONFLICT (id) DO NOTHING
`

type InsertSnapshotParams struct {
	ID               string      `json:"id"`
	ContainerID      string      `json:"container_id"`
	ParentSnapshotID pgtype.Text `json:"parent_snapshot_id"`
	Snapshotter      string      `json:"snapshotter"`
	Digest           pgtype.Text `json:"digest"`
}

func (q *Queries) InsertSnapshot(ctx context.Context, arg InsertSnapshotParams) error {
	_, err := q.db.Exec(ctx, insertSnapshot,
		arg.ID,
		arg.ContainerID,
		arg.ParentSnapshotID,
		arg.Snapshotter,
		arg.Digest,
	)
	return err
}
