mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 10:41:12 +00:00
The purpose of collection_type_impl::to_value was to serialize a collection for sending over CQL. The corresponding function in origin is called serializeForNativeProtocol, but the name is a bit lengthy, so I settled for serialize_for_cql. The method now became a free-standing function, using the visit function to perform a dispatch on the collection type instead of a virtual call. This also makes it easier to generalize it to UDTs in future commits. Remove the old serialize_for_native_protocol with a FIXME: implement inside. It was already implemented (to_value), just called differently. remove dead methods: enforce_limit and serialized_values. The corresponding methods in C* are auxiliary methods used inside serializeForNativeProtocol. In our case, the entire algorithm is wholly written in serialize_for_cql.