-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: atomic sum on v8 values #53
Conversation
How does this handle Number.NaN, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY ? |
Same as in JavaScript, because both V8 and Rust implement IEEE-754 floating point numbers. |
sqlite/backend.rs
Outdated
if matches!(operand, KvValue::U64(_)) { | ||
mutate_le64( | ||
tx, | ||
&mutation.key, | ||
"sum", | ||
operand, | ||
version, | ||
|a, b| a.wrapping_add(b), | ||
)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can this code path be triggered from JS? By using Deno.AtomicOperation.mutate()
method, and passing KvU64
value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
No description provided.