MCPcopy Create free account
hub / github.com/datastax/cql-proxy / EncodedLength

Method EncodedLength

codecs/partial_codecs.go:168–181  ·  view source on GitHub ↗
(msg message.Message, version primitive.ProtocolVersion)

Source from the content-addressed store, hash-verified

166}
167
168func (c *partialExecuteCodec) EncodedLength(msg message.Message, version primitive.ProtocolVersion) (size int, err error) {
169 switch execute := msg.(type) {
170 case *PartialExecute:
171 length := primitive.LengthOfShortBytes(execute.QueryId)
172 if version >= primitive.ProtocolVersion5 {
173 length += primitive.LengthOfShortBytes(execute.ResultMetadataId)
174 }
175 length += primitive.LengthOfShort
176 length += len(execute.Parameters)
177 return length, nil
178 default:
179 return builtinExecuteCodec.EncodedLength(msg, version)
180 }
181}
182
183func (c *partialExecuteCodec) Decode(source io.Reader, version primitive.ProtocolVersion) (msg message.Message, err error) {
184 var (

Callers 1

Calls 1

EncodedLengthMethod · 0.45

Tested by 1