Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
(dst []byte)
| 40 | |
| 41 | // Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length. |
| 42 | func (src *FunctionCallResponse) Encode(dst []byte) ([]byte, error) { |
| 43 | dst, sp := beginMessage(dst, 'V') |
| 44 | |
| 45 | if src.Result == nil { |
| 46 | dst = pgio.AppendInt32(dst, -1) |
| 47 | } else { |
| 48 | dst = pgio.AppendInt32(dst, int32(len(src.Result))) |
| 49 | dst = append(dst, src.Result...) |
| 50 | } |
| 51 | |
| 52 | return finishMessage(dst, sp) |
| 53 | } |
| 54 | |
| 55 | // MarshalJSON implements encoding/json.Marshaler. |
| 56 | func (src FunctionCallResponse) MarshalJSON() ([]byte, error) { |
nothing calls this directly
no test coverage detected