func (db *DB) UpdateOrderAmountsWithinTransaction(order *match.LimitOrder, pair *match.Pair, tx *sql.Tx) (err error) {
	defer func() {
		if err != nil {
			err = fmt.Errorf("Error updating order within transaction: \n%s", err)
			return
		}
	}()

	updateOrderQuery := fmt.Sprintf("UPDATE %s SET amountHave=%d, amountWant=%d WHERE orderID='%s';", pair.String(), order.AmountHave, order.AmountWant, order.OrderID)
	if _, err = tx.Exec(updateOrderQuery); err != nil {
		logging.Infof("weird order thing: %s", updateOrderQuery)
		return
	}
	return
}
// UpdateOrderAmountsWithinTransaction updates a single order within a sql transaction
UpdateOrderAmountsWithinTransaction updates a single order within a sql transaction
// UpdateOrderAmountsWithinTransaction updates a single order within a sql transaction
func (db *DB) UpdateOrderAmountsWithinTransaction(order *match.LimitOrder, pair *match.Pair, tx *sql.Tx) (err error) {
	defer func() {
		if err != nil {
			err = fmt.Errorf("Error updating order within transaction: \n%s", err)
			return
		}
	}()
	updateOrderQuery := fmt.Sprintf("UPDATE %s SET amountHave=%d, amountWant=%d WHERE orderID='%s';", pair.String(), order.AmountHave, order.AmountWant, order.OrderID)
	if _, err = tx.Exec(updateOrderQuery); err != nil {
		logging.Infof("weird order thing: %s", updateOrderQuery)
		return
	}
	return
}
func ( db * DB ) UpdateOrderAmountsWithinTransaction ( order * match . LimitOrder , pair * match . Pair , tx * sql . Tx ) ( err error ) { defer func ( ) { if err != nil { err = fmt . Errorf ( " \n " , err ) return } } ( ) updateOrderQuery := fmt . Sprintf ( " " , pair . String ( ) , order . AmountHave , order . AmountWant , order . OrderID ) if _ , err = tx . Exec ( updateOrderQuery ) ; err != nil { logging . Infof ( " " , updateOrderQuery ) return } return }
UpdateOrderAmountsWithinTransaction updates a single order within a sql transaction
UpdateOrderAmountsWithinTransaction updates a single order within a sql transaction