MCPcopy Create free account
hub / github.com/daodst/chat / Do

Method Do

internal/sqlutil/writer_dummy.go:20–28  ·  view source on GitHub ↗
(db *sql.DB, txn *sql.Tx, f func(txn *sql.Tx) error)

Source from the content-addressed store, hash-verified

18}
19
20func (w *DummyWriter) Do(db *sql.DB, txn *sql.Tx, f func(txn *sql.Tx) error) error {
21 if db != nil && txn == nil {
22 return WithTransaction(db, func(txn *sql.Tx) error {
23 return f(txn)
24 })
25 } else {
26 return f(txn)
27 }
28}

Callers

nothing calls this directly

Calls 1

WithTransactionFunction · 0.85

Tested by

no test coverage detected