mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Add PgConn.IsBusy() method
This commit is contained in:
parent
0077ff0474
commit
fcfd7d09a9
@ -520,6 +520,11 @@ func (pgConn *PgConn) IsClosed() bool {
|
|||||||
return pgConn.status < connStatusIdle
|
return pgConn.status < connStatusIdle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsBusy reports if the connection is busy.
|
||||||
|
func (pgConn *PgConn) IsBusy() bool {
|
||||||
|
return pgConn.status == connStatusBusy
|
||||||
|
}
|
||||||
|
|
||||||
// lock locks the connection.
|
// lock locks the connection.
|
||||||
func (pgConn *PgConn) lock() error {
|
func (pgConn *PgConn) lock() error {
|
||||||
switch pgConn.status {
|
switch pgConn.status {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user