forked from mtusi2026/mtusi2026lab2
ЛР 2: закрыть уровень 4
Завершить PostgreSQL, Redis-сессии, миграции, таймауты и диагностику. Зафиксировать собственные тесты и доказательства финального прогона: 43 PASS, 0 FAIL, 0 SKIP; 768 HTTP-запросов без ошибок. Добавить официальный отчёт с запуском, архитектурой, SQL-планами и ограничениями. PR отложен до завершения уровня 5.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: chat_members.sql
|
||||
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
||||
const createChatMember = `-- name: CreateChatMember :exec
|
||||
INSERT INTO chat_members(chat_id, user_id)
|
||||
VALUES ($1, $2)
|
||||
`
|
||||
|
||||
type CreateChatMemberParams struct {
|
||||
ChatID pgtype.UUID
|
||||
UserID pgtype.UUID
|
||||
}
|
||||
|
||||
func (q *Queries) CreateChatMember(ctx context.Context, arg CreateChatMemberParams) error {
|
||||
_, err := q.db.Exec(ctx, createChatMember, arg.ChatID, arg.UserID)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user