![]() The OLD value does not persist after the return of the UPDATE or UPSERT command, so you'll have to archive it right away or the older document will be lost. and had to change code like this, CursorResult cs arangoDriver.executeAqlQuery('LET x (FOR v IN 1.1000 OUTBOUND nodeid GRAPH 'TempPeoplesApp' ' + ' RETURN v.x)' + ' RETURN SUM(x)', bindVars, null. ![]() Now i replaced java driver with latest version 3.0.0 version. I was using ArangoDB version 3.0.2 version and java driver version 2.4 version. The updated document will receive a new _rev value after that update. Hi mpv, Thanks for pointing out in right direction. Remember, you have access to the old version of a document when you execute an UPDATE or UPSERT command ( the doco) and you could choose to return the OLD document contents to push off to an archive location, or process as you wish. If the database returns a different _rev value than what you were checking for then your code can respond to the document changing, however required. Rather than having to do a deep compare on a document and what you expect to see, you can just compare the _rev attribute with what you expect to see. The _rev attribute can be very helpful when scanning a document and seeing if any values were changed. To store historical values you would need to implement a process to archive the old values of a document when they get updated. ![]() Download and install the latest ArangoDB version. We can’t guarantee this will work for future versions of the database system. Disclaimer: This ArangoDB tutorial uses database v3.7. You can't change it directly, but every time you UPDATE a document in a collection, the _rev value is updated. ArangoDB can work with KeyLines to power a robust graph visualization application. My understanding is that the revision ( _rev) attribute is just there as a marker so you can know when a field was updated.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |