patrickfrey / strusWebService

web service (HTTP/JSON) to use the strus API as a service
http://project-strus.net
Mozilla Public License 2.0
4 stars 0 forks source link

[CLOSED] insert, update, delete, commit, rollback should report a 'number of documents affected' #11

Closed andreasbaumann closed 6 years ago

andreasbaumann commented 6 years ago

Issue by andreasbaumann Saturday Apr 16, 2016 at 18:26 GMT Originally opened as https://github.com/Eurospider/strusWebService/issues/11


As in a database. This helps users of the service to react properly.

andreasbaumann commented 6 years ago

Comment by andreasbaumann Friday Jun 03, 2016 at 09:33 GMT


Do we have support for this from the strus library?

andreasbaumann commented 6 years ago

Comment by andreasbaumann Thursday Nov 10, 2016 at 12:18 GMT


Logical would be insert/update/delete giving us number of documents affected, begin/ rollback/commit are always 0. This is like for instance in a database like Postgresql and easy to implement.

andreasbaumann commented 6 years ago

Comment by patrickfrey Friday Nov 11, 2016 at 15:38 GMT


There is support now in the strus core:

StorageTransactionInterface: virtual unsigned int nofDocumentsAffected() const=0;

andreasbaumann commented 6 years ago

Comment by andreasbaumann Saturday Nov 12, 2016 at 14:40 GMT


We have do adjust our model in the webservice a little bit: we cannot know on insert or delete how many documents will be affected, only when we commit. In the implicit commit case this also works.