Compare commits
No commits in common. "497e4039ecf1e963207c9f3e9b3266cd6d416184" and "f1e61aee2d80873f596261ffbd2037b85b1a32ec" have entirely different histories.
497e4039ec
...
f1e61aee2d
1 changed files with 0 additions and 23 deletions
|
|
@ -281,29 +281,6 @@ func (q *Queries) GetUserByID(ctx context.Context, id int64) (GetUserByIDRow, er
|
|||
return i, err
|
||||
}
|
||||
|
||||
const getUserByNickname = `-- name: GetUserByNickname :one
|
||||
SELECT id, avatar_id, passhash, mail, nickname, disp_name, user_desc, creation_date, last_login
|
||||
FROM users
|
||||
WHERE nickname = $1
|
||||
`
|
||||
|
||||
func (q *Queries) GetUserByNickname(ctx context.Context, nickname string) (User, error) {
|
||||
row := q.db.QueryRow(ctx, getUserByNickname, nickname)
|
||||
var i User
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
&i.AvatarID,
|
||||
&i.Passhash,
|
||||
&i.Mail,
|
||||
&i.Nickname,
|
||||
&i.DispName,
|
||||
&i.UserDesc,
|
||||
&i.CreationDate,
|
||||
&i.LastLogin,
|
||||
)
|
||||
return i, err
|
||||
}
|
||||
|
||||
const getUserTitleByID = `-- name: GetUserTitleByID :one
|
||||
SELECT
|
||||
ut.user_id, ut.title_id, ut.status, ut.rate, ut.review_id, ut.ctime,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue