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

Method EncodedLength

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

Source from the content-addressed store, hash-verified

54}
55
56func (c *partialQueryCodec) EncodedLength(msg message.Message, version primitive.ProtocolVersion) (int, error) {
57 switch query := msg.(type) {
58 case *PartialQuery:
59 length := primitive.LengthOfLongString(query.Query)
60 length += primitive.LengthOfShort
61 length += len(query.Parameters)
62 return length, nil
63 default:
64 return builtinQueryCodec.EncodedLength(msg, version)
65 }
66}
67
68func (c *partialQueryCodec) Decode(source io.Reader, _ primitive.ProtocolVersion) (msg message.Message, err error) {
69 var (

Callers 5

EncodedLengthMethod · 0.45
EncodedLengthMethod · 0.45

Calls

no outgoing calls

Tested by 3