Hi Is there any method, how to add new doc into existing collection? I studied XQUF and it seems, like it can only update existing nodes. Options I was thinking about are
- fn:put() - it is supposed for publishing into external documents, but if I could use uri of collection in BaseX and BaseX would accept it... - using database functionshttp://docs.basex.org/wiki/Database_Functions, but also here I do not see anything, what would add a doc
The motivation is simple - if I could add docs by XQuery, I can save some roundtrips of data to insert Workaround is also not so difficult - simply using some sort of container doc in target collection and then modifying its nodes (putting here content of complete logical doc) instead of adding complete doc.
Any comments are welcome.
Jan