Files
OwnCord/Server/db/pgdbgen/profile.sql.go
T
J3vb 9116a880a3 feat(phase-bc): pass 5 — pgdbgen, postgres EventStore/PluginStore, plugin hub wiring, OTel stack, reconnect DB tier
- Generate Server/db/dbgen/{events,plugins}.sql.go and full Server/db/pgdbgen/ (//go:build postgres gated)
- Implement PostgresStore EventStore and PluginStore methods in store/postgres.go
- Wire plugin host_events.go EventSink into hub broadcast path (SetPluginEventSink)
- Wire host_commands.go slash-command dispatcher: chat_command V1 handler + hub.SetPluginRegistry
- Add handlers_command.go + handlers_command_test.go for plugin slash-command dispatch
- Add reconnect_db_test.go: TestReconnect_BufferMiss_FallsBackToDBTier (cold-tier DB replay)
- Add otel-up/otel-down Makefile targets; docker-compose.otel.yml + prometheus.dev.yml
- Update PHASE_BC_LOCAL_TODO.md: mark in-session items complete; document remaining network-blocked steps
- Minor fixes: channel_handler access-control, router plugin handler wiring, service span instrumentation
2026-04-06 22:48:59 +02:00

49 lines
1.2 KiB
Go

//go:build postgres
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: profile.sql
package pgdbgen
import (
"context"
)
const updateUserPassword = `-- name: UpdateUserPassword :exec
UPDATE users SET password = $1 WHERE id = $2
`
type UpdateUserPasswordParams struct {
Password string `json:"password"`
ID int64 `json:"id"`
}
func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) error {
_, err := q.db.Exec(ctx, updateUserPassword, arg.Password, arg.ID)
return err
}
const updateUserProfile = `-- name: UpdateUserProfile :execrows
UPDATE users SET username = $1, avatar = $2 WHERE id = $3
`
type UpdateUserProfileParams struct {
Username string `json:"username"`
Avatar *string `json:"avatar"`
ID int64 `json:"id"`
}
// PostgreSQL variants of the sqlite profile queries.
// UpdateUserProfile uses :execrows because postgres has no LastInsertId;
// the caller checks rows-affected for existence.
func (q *Queries) UpdateUserProfile(ctx context.Context, arg UpdateUserProfileParams) (int64, error) {
result, err := q.db.Exec(ctx, updateUserProfile, arg.Username, arg.Avatar, arg.ID)
if err != nil {
return 0, err
}
return result.RowsAffected(), nil
}