I write the function in lib.xqm as a standalone query. All it does it add some attributes to each testcase before importing the content into the database. Forgive me if this is hard to read, it was my first attempt at making a function which updates some records and then imports in the same query.
I decided to break that query out into its own function, where I then call it from another query, import-and-process.xq, which works as expected.
I am now trying to write a bulk import, which is import-all.xq and this is not working. I receive a message about updates not being written back. My first attempt to write that function inside of a for-each also failed.
I've read all the documentation I can get my hands on regarding how to write the kinds of queries I need but there still seems to be gotchas I can't seem to see in advance. Any help would be greatly appreciated.
Joshua Kordani
DISCLAIMER: This email communication and any attached files are Speedcast Wireless proprietary and may be legally privileged. Export-controlled information shall not be disseminated without proper authorization and proper export-control markings, per Speedcast Wireless export policy. If you have received this transmission in error please notify the sender immediately and then delete this email and all its attachments. If you are not the addressee, any disclosure, reproduction, copying, distribution, or any other dissemination or use of this communication is strictly prohibited. Thank you.
Hi Joshua,
I write the function in lib.xqm as a standalone query. All it does it add some attributes to each testcase before importing the content into the database. Forgive me if this is hard to read, it was my first attempt at making a function which updates some records and then imports in the same query.
Looks fine. Thanks for sending code that can be parsed out-of-the-box.
I am now trying to write a bulk import, which is import-all.xq and this is not working. I receive a message about updates not being written back. My first attempt to write that function inside of a for-each also failed.
This warning is only shown on command line. It simply indicates that your updates won’t be propagated back to the original files.
If that’s what you would like to achieve, you can use the command-line argument -u (see [1]). If something else is not working as expected, feel free to provide us with more details.
Best, Christian
basex-talk@mailman.uni-konstanz.de