feat(app) lab 3 implemented

This commit is contained in:
imadev
2026-10-30 18:11:30 +03:00
parent f731f9b460
commit 48a616e910
57 changed files with 1390 additions and 303 deletions
+16
View File
@@ -0,0 +1,16 @@
package store
import (
"context"
"time"
"github.com/jackc/pgx/v5"
)
const rollbackTimeout = 5 * time.Second
func rollback(tx pgx.Tx) {
ctx, cancel := context.WithTimeout(context.Background(), rollbackTimeout)
defer cancel()
_ = tx.Rollback(ctx)
}