mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 18:10:48 +00:00
update
This commit is contained in:
parent
5d0c0a03d7
commit
40078cba2c
@ -110,6 +110,14 @@ type DB struct {
|
||||
stmts map[string]*sql.Stmt
|
||||
}
|
||||
|
||||
func (d *DB) Begin() (*sql.Tx, error) {
|
||||
return d.DB.Begin()
|
||||
}
|
||||
|
||||
func (d *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
|
||||
return d.DB.BeginTx(ctx, opts)
|
||||
}
|
||||
|
||||
func (d *DB) getStmt(query string) (*sql.Stmt, error) {
|
||||
d.RLock()
|
||||
if stmt, ok := d.stmts[query]; ok {
|
||||
|
Loading…
Reference in New Issue
Block a user