-
hello ! In all the example I can find in rust, the db.update method is always ran using the I would like to do something like that : db.update((
"news",
format!("where link == {link}"))
)
.content(News {...})
.await?; Thank you ! |
Beta Was this translation helpful? Give feedback.
Answered by
naisofly
Oct 19, 2023
Replies: 1 comment 2 replies
-
the id can represent a specific record's ID. Take a record id like |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mirsella Yes, that's true. To use
WHERE
clauses you will need to useSurreal::query
which, in your words, involves building a query.Also
Surreal::update
supports updating:range
method.You just can't update specific records by filtering on any other field except
id
.Hope this helps!