CopyFail should be frontend message
This commit is contained in:
@@ -14,6 +14,7 @@ type Backend struct {
|
|||||||
// Frontend message flyweights
|
// Frontend message flyweights
|
||||||
bind Bind
|
bind Bind
|
||||||
_close Close
|
_close Close
|
||||||
|
copyFail CopyFail
|
||||||
describe Describe
|
describe Describe
|
||||||
execute Execute
|
execute Execute
|
||||||
flush Flush
|
flush Flush
|
||||||
@@ -80,6 +81,8 @@ func (b *Backend) Receive() (FrontendMessage, error) {
|
|||||||
msg = &b.describe
|
msg = &b.describe
|
||||||
case 'E':
|
case 'E':
|
||||||
msg = &b.execute
|
msg = &b.execute
|
||||||
|
case 'f':
|
||||||
|
msg = &b.copyFail
|
||||||
case 'H':
|
case 'H':
|
||||||
msg = &b.flush
|
msg = &b.flush
|
||||||
case 'P':
|
case 'P':
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ type CopyFail struct {
|
|||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*CopyFail) Backend() {}
|
func (*CopyFail) Frontend() {}
|
||||||
|
|
||||||
func (dst *CopyFail) Decode(src []byte) error {
|
func (dst *CopyFail) Decode(src []byte) error {
|
||||||
idx := bytes.IndexByte(src, 0)
|
idx := bytes.IndexByte(src, 0)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ type Frontend struct {
|
|||||||
copyInResponse CopyInResponse
|
copyInResponse CopyInResponse
|
||||||
copyOutResponse CopyOutResponse
|
copyOutResponse CopyOutResponse
|
||||||
copyDone CopyDone
|
copyDone CopyDone
|
||||||
copyFail CopyFail
|
|
||||||
dataRow DataRow
|
dataRow DataRow
|
||||||
emptyQueryResponse EmptyQueryResponse
|
emptyQueryResponse EmptyQueryResponse
|
||||||
errorResponse ErrorResponse
|
errorResponse ErrorResponse
|
||||||
@@ -82,8 +81,6 @@ func (b *Frontend) Receive() (BackendMessage, error) {
|
|||||||
msg = &b.dataRow
|
msg = &b.dataRow
|
||||||
case 'E':
|
case 'E':
|
||||||
msg = &b.errorResponse
|
msg = &b.errorResponse
|
||||||
case 'f':
|
|
||||||
msg = &b.copyFail
|
|
||||||
case 'G':
|
case 'G':
|
||||||
msg = &b.copyInResponse
|
msg = &b.copyInResponse
|
||||||
case 'H':
|
case 'H':
|
||||||
|
|||||||
Reference in New Issue
Block a user