ES will split the large string values into chunks (of up to 3996 bytes),
even though the entire set of chunks is contained within the answer
(and thus chunking is unnecessary; this is similar to ES'es use of
CBOR undefined length arrays, as possibly programming convenience,
rather than considerations for the transport layers. HTTP/TCP layers
won't benefit from this behavior).
Confusingly, the tinycbor library won't distinguish between a container
of chunked string values and a container of a contiguous string value.
This PR corrects driver's handling of chunked string values:
it introduces a new CBOR utility function that will fail to get string
references, if the value is chunked; this is mostly useful for fetching
object key names, which are part of the protocol and short (should
never be chunked);
it will now allow the cursor string to be chunked, in which case it'll
be allocated by the tinycbor library.
it will use a thread local static buffer to re-assemble the chunks
into one contiguous value for the row string values (that will later
require conversion to UTF16).
ES will split the large string values into chunks (of up to 3996 bytes), even though the entire set of chunks is contained within the answer (and thus chunking is unnecessary; this is similar to ES'es use of CBOR undefined length arrays, as possibly programming convenience, rather than considerations for the transport layers. HTTP/TCP layers won't benefit from this behavior).
Confusingly, the tinycbor library won't distinguish between a container of chunked string values and a container of a contiguous string value.
This PR corrects driver's handling of chunked string values: