x/database/doc.go
Colin Henry 56752521c2
All checks were successful
Go / build (1.23) (push) Successful in 2m31s
added doc
2025-03-18 22:28:20 -07:00

28 lines
354 B
Go

package database
/*
Example usage:
ctx, _ := context.WithCancel(context.Background())
dba = &db.Actor{
DB: s.db,
ActionChan: make(chan database.Func),
}
go dba.Run(ctx)
*/
/*
Transactor Example:
func insert(ctx context.Context, db *sql.DB) error{
// SQL HERE
}
...
dba.ActionChan <- db.WithTransaction(insert)
*/