mirror of
https://github.com/lightninglabs/loop
synced 2024-11-09 19:10:47 +00:00
36 lines
822 B
Go
36 lines
822 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.25.0
|
|
// source: liquidity_params.sql
|
|
|
|
package sqlc
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const fetchLiquidityParams = `-- name: FetchLiquidityParams :one
|
|
SELECT params FROM liquidity_params WHERE id = 1
|
|
`
|
|
|
|
func (q *Queries) FetchLiquidityParams(ctx context.Context) ([]byte, error) {
|
|
row := q.db.QueryRowContext(ctx, fetchLiquidityParams)
|
|
var params []byte
|
|
err := row.Scan(¶ms)
|
|
return params, err
|
|
}
|
|
|
|
const upsertLiquidityParams = `-- name: UpsertLiquidityParams :exec
|
|
INSERT INTO liquidity_params (
|
|
id, params
|
|
) VALUES (
|
|
1, $1
|
|
) ON CONFLICT (id) DO UPDATE SET
|
|
params = excluded.params
|
|
`
|
|
|
|
func (q *Queries) UpsertLiquidityParams(ctx context.Context, params []byte) error {
|
|
_, err := q.db.ExecContext(ctx, upsertLiquidityParams, params)
|
|
return err
|
|
}
|