Add files to the database
Tuesday, 16 October 2012 · 1 message
RM
Raymond Meester16 Oct 2012 09:36 #
Charles, thanks for the examples. I first thought using the core API, like "new Add(doc).execute(context); ", but to get working you need conversions and ToString methods and loose the direct manipulation options. I needed a concurrent set up anyway.
What I also didn't get from the core library; when using multiple instances I got a FileLockException in the stack trace (as expected), but then the general message "org.basex.core.BaseXException: Improper use? Potential bug?" was shown. Maybe an error message about the filelock and concurrency would be clearer as its not a bug. There are some databases like SQLite that support concurrency (to some extend) while directly using a OS file system, but that lead often to unexpected results (locking on network shares for example).
Written for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery