|
@@ -150,7 +150,14 @@ func (d *DB) TransUpdate(query string, args interface{}) (reply Reply) {
|
|
|
|
|
|
|
|
|
func (d *DB) TransRow(dest interface{}, query string, args interface{}) error {
|
|
|
- err = d.tx.Get(dest, query, args)
|
|
|
+ nstmt, err := d.tx.PrepareNamed(query)
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ defer nstmt.Close()
|
|
|
+
|
|
|
+ err = nstmt.Get(dest, args)
|
|
|
+
|
|
|
return err
|
|
|
}
|
|
|
|