-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization error when incrementing a counter #1099
Comments
We have a section of documentation about It sadly doesn't have an update example, but it does show what type to use: So you example would be: use scylla::frame::value::Counter;
session.execute_unpaged(&increment_by_statement, (Counter(100i64),)).await?; |
@wprzytula possible minor issue: I see there is |
I missed that doc. Your solution works like a charm. Thank you! Fell free to close this issue one you figure out what to do with serialization vs deserialization type discrepancy. |
For completeness, I opened a PR that adds an example snippet that updates the counter value: #1100 |
Agreed. I encourage you to fix that. |
|
I'm trying to increment a counter column with a query like this:
My code is proving a value of type i64:
Execution fails at serialization of parameters:
It seems that i64 can't be used to increment a counter. I tried providing
CqlValue::BigInt(100)
andnum_bingint::BigInt
, none of those worked. How would I provide a value to that query?The text was updated successfully, but these errors were encountered: