2
0

Add more documentation to TxStatus

This commit is contained in:
Jack Christensen
2020-12-23 12:21:34 -06:00
parent e0d22c1100
commit e276d9b832
+8 -1
View File
@@ -512,7 +512,14 @@ func (pgConn *PgConn) PID() uint32 {
return pgConn.pid
}
// TxStatus returns the current TxStatus as reported by the server.
// TxStatus returns the current TxStatus as reported by the server in the ReadyForQuery message.
//
// Possible return values:
// 'I' - idle / not in transaction
// 'T' - in a transaction
// 'E' - in a failed transaction
//
// See https://www.postgresql.org/docs/current/protocol-message-formats.html.
func (pgConn *PgConn) TxStatus() byte {
return pgConn.txStatus
}