On Mon, 2022-02-21 at 19:01 -0500, Liam R. E. Quin wrote:
On Mon, 2022-02-21 at 17:08 -0500, Eric Levy wrote:
Presently, BaseX offers limited support for embedded use. It seems, at least in principle, a feasible path is available to strengthen the support for the embedded case by supporting a mode of opening a database from a file path independent of data external to the path.
Just to be clear, there are two common uses for the term "path" and i'm not sure which you mean... (1) a filename, e.g. /usrpk/dp/projects/basex/db107 (2) a list of directories (folders) to search for something (DBBPATH)
You can open a database at a given file location easily in BaseX from within XQuery using db:open() and for that matter you can search a list of directories.
Your wording is abstract enough that i'm not sure i've understood what you're trying to do, though.
Liam
I am using "path" in the sense of (1), as in a file location, not in sense (2), as in "search path".
The "open" function is documented as follows:
db:open($db as xs:string, $path as xs:string) as document-node()*
Opens the database $db and returns all document nodes. The document nodes to be returned can be filtered with the $path argument.
The database is given as a name, not a path. The variable named "path" is described as a path within the database for filtering nodes, not as a file path within the system file tree.
My use would need a function as such that may be used as such:
db:open_from_path("/home/user/path/to/database/in/filesystem")
Do I misunderstand?