You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 ValueLists that I need to merge because I have a query with a very large number of parameters. I do not want to have to pass all the values individually. How would I go about doing this? ValueList seems to have a private buffer for the serialized values.
Any help would be deeply appreciated.
More specifically, ValueList just takes a struct A for example and turns it into a SerializedResult of type Result<Cow<SerializedValues>, SerializeValuesError>. My goal is I want to be able to take 2 structs struct A and struct B that both implement ValueList and pass them to a query. So I want to be able to merge them into 1 ValueList.
The text was updated successfully, but these errors were encountered:
At the first glance, I don't immediately see a convenient solution to your problem.
In general though, I recommend using the new SerializeCql/SerializeRow trait tandem instead of the obsolete Value/ValueList pair.
What you could do is creating a wrapper struct that would take both A and B and implement SerializeRow on it manually so that it achieves what want to.
We can consider implementing a general adapter that would take two structs implementing SerializeRow and implement serialization of them consecutively as a row. At the moment I don't know yet whether this is even feasible, tbh.
I have 2 ValueLists that I need to merge because I have a query with a very large number of parameters. I do not want to have to pass all the values individually. How would I go about doing this? ValueList seems to have a private buffer for the serialized values.
Any help would be deeply appreciated.
More specifically, ValueList just takes a
struct A
for example and turns it into aSerializedResult
of typeResult<Cow<SerializedValues>, SerializeValuesError>
. My goal is I want to be able to take 2 structsstruct A
andstruct B
that both implementValueList
and pass them to aquery
. So I want to be able to merge them into 1ValueList
.The text was updated successfully, but these errors were encountered: