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.
paopao-ce/internal/dao/slonik/sqlc/auto/pgc/messages.sql.go

26 lines
671 B

// 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
}