Created
January 19, 2020 13:22
-
-
Save yutakahashi114/cf8e493cfdaca60e408c2e23af3773e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var friendID uint64 | |
has, err = engine. | |
Table("friends"). | |
Where("user_id = ?", id). | |
Where("deleted_at IS NULL"). | |
Desc("created_at"). | |
Cols("friend_id"). | |
Get(&friendID) | |
if err != nil { | |
log.Println(err) | |
return | |
} | |
if !has { | |
log.Println("Not Found") | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment