// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.31.1
// source: network_settings.sql

package dbq

import (
	"context"
)

const getNetworkSettings = `-- name: GetNetworkSettings :one
SELECT id, trusted_proxy_hops FROM network_settings WHERE id = true
`

func (q *Queries) GetNetworkSettings(ctx context.Context) (NetworkSetting, error) {
	row := q.db.QueryRow(ctx, getNetworkSettings)
	var i NetworkSetting
	err := row.Scan(&i.ID, &i.TrustedProxyHops)
	return i, err
}

const updateTrustedProxyHops = `-- name: UpdateTrustedProxyHops :one
UPDATE network_settings SET trusted_proxy_hops = $1 WHERE id = true RETURNING id, trusted_proxy_hops
`

func (q *Queries) UpdateTrustedProxyHops(ctx context.Context, trustedProxyHops int32) (NetworkSetting, error) {
	row := q.db.QueryRow(ctx, updateTrustedProxyHops, trustedProxyHops)
	var i NetworkSetting
	err := row.Scan(&i.ID, &i.TrustedProxyHops)
	return i, err
}
