1
0

Update module lib/pq to v1.5.0 (#476)

Update module lib/pq to v1.5.0

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/476
This commit is contained in:
renovate
2020-05-03 18:14:57 +00:00
committed by konrad
parent 19a05a7c2c
commit 23950c0602
5 changed files with 25 additions and 3 deletions

11
vendor/github.com/lib/pq/notify.go generated vendored
View File

@ -4,6 +4,7 @@ package pq
// This module contains support for Postgres LISTEN/NOTIFY.
import (
"database/sql/driver"
"errors"
"fmt"
"sync"
@ -29,6 +30,16 @@ func recvNotification(r *readBuf) *Notification {
return &Notification{bePid, channel, extra}
}
// SetNotificationHandler sets the given notification handler on the given
// connection. A runtime panic occurs if c is not a pq connection. A nil handler
// may be used to unset it.
//
// Note: Notification handlers are executed synchronously by pq meaning commands
// won't continue to be processed until the handler returns.
func SetNotificationHandler(c driver.Conn, handler func(*Notification)) {
c.(*conn).notificationHandler = handler
}
const (
connStateIdle int32 = iota
connStateExpectResponse