2
0

CopyFail should be frontend message

This commit is contained in:
Jack Christensen
2019-05-17 13:27:11 -05:00
parent 4acc0f54c6
commit a340d5f15f
3 changed files with 4 additions and 4 deletions
+3
View File
@@ -14,6 +14,7 @@ type Backend struct {
// Frontend message flyweights
bind Bind
_close Close
copyFail CopyFail
describe Describe
execute Execute
flush Flush
@@ -80,6 +81,8 @@ func (b *Backend) Receive() (FrontendMessage, error) {
msg = &b.describe
case 'E':
msg = &b.execute
case 'f':
msg = &b.copyFail
case 'H':
msg = &b.flush
case 'P':
+1 -1
View File
@@ -11,7 +11,7 @@ type CopyFail struct {
Message string
}
func (*CopyFail) Backend() {}
func (*CopyFail) Frontend() {}
func (dst *CopyFail) Decode(src []byte) error {
idx := bytes.IndexByte(src, 0)
-3
View File
@@ -22,7 +22,6 @@ type Frontend struct {
copyInResponse CopyInResponse
copyOutResponse CopyOutResponse
copyDone CopyDone
copyFail CopyFail
dataRow DataRow
emptyQueryResponse EmptyQueryResponse
errorResponse ErrorResponse
@@ -82,8 +81,6 @@ func (b *Frontend) Receive() (BackendMessage, error) {
msg = &b.dataRow
case 'E':
msg = &b.errorResponse
case 'f':
msg = &b.copyFail
case 'G':
msg = &b.copyInResponse
case 'H':