Files
multica/server/pkg/db/generated/system_setting.sql.go
Naiyuan Qing 26142d74aa feat(self-host): collect anonymous source channels mul-3878 (#4741)
* 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
2026-07-01 13:31:25 +08:00

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
}