how to count number documents updated

Hello,

Is there any way to count how many documents have been updated after doing many update operations programmatically using accessor.xquery() method?

Example: consider the following piece of Java API code:
----
if( )
accessor.xquery( “” );
else if( )
accessor.xquery( “” );


accessor.xquery( “” );
-----
Now can I investigate how many documents have been ultimately modified?

Best regards,
Gopal.

Well, calls to accessor.xquery() return a TResponse. You can get an iterator by calling response.getXMLObjectIterator(). Then you can iterate over all of the xml objects to count them.

Now, if your updates overlap and you actually just want a count of documents that were updated (excluding overlap), then I don’t know. :slight_smile:

Overlaps. Make a hashtable. ino:id wil be the key and value the number of updates. First time ino:id appears insert ino:id into the hashtable. If ino:id present update value with count++.
@12313: 1 Update
@23424: 2 Updates
@34345: 1 Update