Hi!
Please bear with me if I begin asking 'irrelevant' questions again... just trying to learn ;)
AFAIK collections and databases are synonymous in basex.
Now XQuery defines a function fn:collection which returns the WHOLE collection (or database within basex) and that one works fine with me.
In basex's documentation, however, there is an additional function basex:db that: "opens an existing database. An optional pre value can be added to choose a specific database node."
Without "pre value" that function does NOT return the WHOLE database, however. Instead it returns only the first document of the collection (at least in my test). So the "pre value" might be optional, but defaults to 1...
Doesn't this behaviour contradict the (minimal) documentation? One COULD be tempted to interpret the docs as "no pre value -> no node chosen -> whole database"?
Greets HPO