// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.29.0
// source: chain_params.sql

package sqlc

import (
	"context"
)

const getChainNetwork = `-- name: GetChainNetwork :one
SELECT network FROM chain_params
WHERE single_row = TRUE
`

func (q *Queries) GetChainNetwork(ctx context.Context) (string, error) {
	row := q.db.QueryRowContext(ctx, getChainNetwork)
	var network string
	err := row.Scan(&network)
	return network, err
}

const insertChainNetwork = `-- name: InsertChainNetwork :exec
INSERT INTO chain_params (single_row, network)
VALUES (TRUE, $1)
ON CONFLICT (single_row) DO NOTHING
`

func (q *Queries) InsertChainNetwork(ctx context.Context, network string) error {
	_, err := q.db.ExecContext(ctx, insertChainNetwork, network)
	return err
}
