On Sat, Mar 8, 2008 at 7:23 PM, Vadim Gritsenko <[EMAIL PROTECTED]> wrote: > > On Mar 6, 2008, at 9:31 PM, Natalia Shilenkova wrote: > > > Recently I had to work on some code that would require to add unique > > resources to Xindice database. Currently, collections can only "store" > > resources, which will add new resource if the key does not exist in > > the collection and will overwrite the resource with new data if key > > already exists. What I needed instead was a way to "insert" or > > "update" resource, where collection would get updated only if resource > > with that key does not exist in case of insert or does exist in case > > of update. Since Xindice does not support transactions or constraints, > > I ended up creating new service that would allow user to insert/update > > resources. > > > > Are there any objections to adding this functionality to trunk? > > Makes sense to me. What service do you propose to add? Care to > describe the interface?
The interface is very straightforward: void insertResource(Resource res) throws XMLDBException void updateResource(Resource res) throws XMLDBException void storeResource(Resource res) throws XMLDBException I am not sure about service name, though. Any suggestions? Regards, Natalia