mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-24 00:32:15 +00:00
atomic_cell_type has various static make_*() methods which create a serialized cell based on the parameters. This patch adds write_() methods which mirror the existing make_*() ones, with the exception that the write methods write into caller-provided buffer. The make methods are refactored to call the appropriate write overload. *_serialized_size() methods are added as well, to calculate how many bytes the serialized data will take after the appropriate write call. This allows code to write cells directly into a pre-arranged buffer, perhaps even multiple ones into the same one. Since the intended use-case this patch prepares for is serializing an entire collection directly into a single buffer, only make variants which are legal in collections are handled. I.e. counters are not.
18 KiB
18 KiB