Permalink
Browse files

Add trade to LIMIT 1

  • Loading branch information...
nomeaning777 committed Oct 20, 2018
1 parent 533e087 commit 684d0c9da4ba86f2ad7e765db2d7c0e592fc420f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/isucon8/isucoin/model/trade.go
@@ -32,7 +32,7 @@ func GetTradeByID(d QueryExecutor, id int64) (*Trade, error) {
}

func GetLatestTrade(d QueryExecutor) (*Trade, error) {
return scanTrade(d.Query("SELECT * FROM trade ORDER BY id DESC"))
return scanTrade(d.Query("SELECT * FROM trade ORDER BY id DESC LIMIT 1"))
}

func GetCandlestickData(d QueryExecutor, mt time.Time, tf string) ([]*CandlestickData, error) {

0 comments on commit 684d0c9

Please sign in to comment.