Ver Fonte

db Trans row

ls há 4 anos atrás
pai
commit
d5a4112064
1 ficheiros alterados com 6 adições e 0 exclusões
  1. 6 0
      db/db.go

+ 6 - 0
db/db.go

@@ -148,6 +148,12 @@ func (d *DB) TransUpdate(query string, args interface{}) (reply Reply) {
 	return
 }
 
+// TransRow trans get row
+func (d *DB) TransRow(dest interface{}, query string, args interface{}) error {
+	err = d.tx.Get(dest, query, args)
+	return err
+}
+
 // Select select
 func (d *DB) Select(dest interface{}, query string, args ...interface{}) error {
 	err := d.Connect()