-
Notifications
You must be signed in to change notification settings - Fork 98
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
Is there a way to retrieve the CAS from the document? #652
Comments
@gsi-alejandro can you please address this, I think we dont have this as a feature today like @xavierchow had mentioned. Is there a limitation as to not exposing the getOptions ? |
I think we can expose it, no problem. |
Next release we plan to expose a way to return the CAS value when available. |
@gsi-alejandro hey, any updates about this? |
+1 |
@gsi-alejandro where are we on this ? cc @ejscribner @thejcfactor |
another solution is:
therefore SDK user won't explicitly use the |
As one of the approaches to concurrency-safe mutating document, I need to get the CAS from the document and replace the doc with it.
I didn't find a documentation about the CAS retrieving, digging into the code it seems the
findById
only gets back thevalue
(that is replaced by content according to latest sdk)node-ottoman/src/model/create-model.ts
Lines 190 to 192 in d8a4936
Will it be a good idea to have the ottoman to support both query CAS and update with it?
my two cents,
FindByIdOptions
to allow querying the CASupdateById
to allow passing a CAS(probably viaMutationFunctionOptions
)?The text was updated successfully, but these errors were encountered: