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

package dbq

import (
	"context"
)

const getRegistrationMode = `-- name: GetRegistrationMode :one
SELECT mode FROM registration_settings WHERE id = true
`

func (q *Queries) GetRegistrationMode(ctx context.Context) (string, error) {
	row := q.db.QueryRow(ctx, getRegistrationMode)
	var mode string
	err := row.Scan(&mode)
	return mode, err
}

const setRegistrationMode = `-- name: SetRegistrationMode :exec
UPDATE registration_settings SET mode = $1 WHERE id = true
`

func (q *Queries) SetRegistrationMode(ctx context.Context, mode string) error {
	_, err := q.db.Exec(ctx, setRegistrationMode, mode)
	return err
}
