2
0

Added FunctionCall support

Added support for FunctionCall message as per
https://www.postgresql.org/docs/11/protocol-message-formats.html

Adds unit test for Encode / Decode cycle and invalid message format
errors.

Fixes https://github.com/jackc/pgproto3/issues/23
This commit is contained in:
Martin Ashby
2021-11-03 19:43:46 +00:00
committed by Jack Christensen
parent 5c447ff35d
commit 9275da562f
5 changed files with 160 additions and 4 deletions
+8 -4
View File
@@ -21,6 +21,7 @@ type Backend struct {
describe Describe
execute Execute
flush Flush
functionCall FunctionCall
gssEncRequest GSSEncRequest
parse Parse
query Query
@@ -29,10 +30,11 @@ type Backend struct {
sync Sync
terminate Terminate
bodyLen int
msgType byte
partialMsg bool
authType uint32
bodyLen int
msgType byte
partialMsg bool
authType uint32
}
const (
@@ -125,6 +127,8 @@ func (b *Backend) Receive() (FrontendMessage, error) {
msg = &b.describe
case 'E':
msg = &b.execute
case 'F':
msg = &b.functionCall
case 'f':
msg = &b.copyFail
case 'd':