Skip to content

Commit

Permalink
handle null
Browse files Browse the repository at this point in the history
  • Loading branch information
tukeJonny committed Nov 1, 2023
1 parent 9fe8969 commit 55d68cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/transplant.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@

## CI実行方法について




## ベンチマーカーで発生するエラーについて

エラーには以下のような種類があります

うち、移植失敗の可能性を示唆するものは以下のとおりです
2 changes: 1 addition & 1 deletion webapp/go/stats_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func getLivestreamStatisticsHandler(c echo.Context) error {
// 最大チップ額
log.Println("checkpoint5")
var maxTip int64
if err := tx.GetContext(ctx, &maxTip, `SELECT MAX(tip) FROM livestreams l INNER JOIN livecomments l2 ON l2.livestream_id = l.id WHERE l.id = ?`, livestreamID); err != nil {
if err := tx.GetContext(ctx, &maxTip, `SELECT IFNULL(MAX(tip), 0) FROM livestreams l INNER JOIN livecomments l2 ON l2.livestream_id = l.id WHERE l.id = ?`, livestreamID); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, err.Error())
}

Expand Down

0 comments on commit 55d68cb

Please sign in to comment.