mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-19 16:15:07 +00:00
We use bytes for many different things, and it is easy to get confused as to what format the data is actually in. Fix that for atomic_cell by proving wrappers. atomic_cell::one corresponds to a bytes object holding exactly one atomic cell, and atomic_cell::view is a bytes_view to an atomic_cell. The static functions of atomic_cell itself are privatized to prevent the unwashed masses from using them on the wrong objects. Since a row entry can hold either a an atomic cell, or a collection, depending on the schema, also introduce a variant type atomic_cell_or_collection and allow the user to pick the type explicitly. Internally both are stored as bytes object.