mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
671 B
26 lines
671 B
1 year ago
|
// Code generated by sqlc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// sqlc v1.20.0
|
||
|
// source: messages.sql
|
||
|
|
||
|
package pgc
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
)
|
||
|
|
||
|
const getUnreadCount = `-- name: GetUnreadCount :one
|
||
|
|
||
|
SELECT count(*) FROM p_message WHERE receiver_user_id=$1 AND is_read=0 AND is_del=0
|
||
|
`
|
||
|
|
||
|
// ------------------------------------------------------------------------------
|
||
|
// message sql dml
|
||
|
// ------------------------------------------------------------------------------
|
||
|
func (q *Queries) GetUnreadCount(ctx context.Context, receiverUserID int64) (int64, error) {
|
||
|
row := q.db.QueryRow(ctx, getUnreadCount, receiverUserID)
|
||
|
var count int64
|
||
|
err := row.Scan(&count)
|
||
|
return count, err
|
||
|
}
|