mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 02:51:28 +00:00
update
This commit is contained in:
parent
5d0c0a03d7
commit
40078cba2c
@ -110,6 +110,14 @@ type DB struct {
|
|||||||
stmts map[string]*sql.Stmt
|
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) {
|
func (d *DB) getStmt(query string) (*sql.Stmt, error) {
|
||||||
d.RLock()
|
d.RLock()
|
||||||
if stmt, ok := d.stmts[query]; ok {
|
if stmt, ok := d.stmts[query]; ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user