package pgproto3

import (
	
	

	
)

type CommandComplete struct {
	CommandTag []byte
}
Backend identifies this message as sendable by the PostgreSQL backend.
func (*CommandComplete) () {}
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message type identifier and 4 byte message length.
func ( *CommandComplete) ( []byte) error {
	 := bytes.IndexByte(, 0)
	if  != len()-1 {
		return &invalidMessageFormatErr{messageType: "CommandComplete"}
	}

	.CommandTag = [:]

	return nil
}
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
func ( *CommandComplete) ( []byte) []byte {
	 = append(, 'C')
	 := len()
	 = pgio.AppendInt32(, -1)

	 = append(, .CommandTag...)
	 = append(, 0)

	pgio.SetInt32([:], int32(len([:])))

	return 
}
MarshalJSON implements encoding/json.Marshaler.
func ( CommandComplete) () ([]byte, error) {
	return json.Marshal(struct {
		       string
		 string
	}{
		:       "CommandComplete",
		: string(.CommandTag),
	})