Hi,
What do you mean when write about atomic ? increment without  concurrent
modification exception ?
If you use embedded storage you can lock records on storage level , and
then release them.

You may use
com.orientechnologies.orient.core.storage.OStorage#callInRecordLock but
please use it with care, to avoid deadlocks.




On Fri, Jan 3, 2014 at 12:48 PM, Leng Sheng Hong <[email protected]> wrote:

> How do you do a SQL like this in Java api for a document base DB?
> Update MyTable INCREMENT quantity = 100 where @rid = #21:1
>
> I doubt setting fields and save() is actually atomic?
> doc.fields("quantity", doc.fields("quantity") + 100 )
> doc.save()
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to