mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-16 22:59:04 +02:00
* feat(self-host): collect anonymous source channels * feat(self-host): include other source text * feat(self-host): report source channel domains * feat(self-host): add source domain reporting control * fix(self-host): simplify source reporting copy * fix(self-host): simplify source channel reporting gate * fix(self-host): limit source reporting triggers * chore(self-host): point source reporting at staging
31 lines
705 B
Go
31 lines
705 B
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
// source: system_setting.sql
|
|
|
|
package db
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
const getOrCreateSystemSetting = `-- name: GetOrCreateSystemSetting :one
|
|
INSERT INTO system_setting (key, value)
|
|
VALUES ($1, $2)
|
|
ON CONFLICT (key) DO UPDATE
|
|
SET value = system_setting.value
|
|
RETURNING value
|
|
`
|
|
|
|
type GetOrCreateSystemSettingParams struct {
|
|
Key string `json:"key"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
func (q *Queries) GetOrCreateSystemSetting(ctx context.Context, arg GetOrCreateSystemSettingParams) (string, error) {
|
|
row := q.db.QueryRow(ctx, getOrCreateSystemSetting, arg.Key, arg.Value)
|
|
var value string
|
|
err := row.Scan(&value)
|
|
return value, err
|
|
}
|