json:doc-available()

Friday, 28 August 2020 · 2 messages · last reply 30 Aug 2020
HR
Hans-Juergen Rennau28 Aug 2020 10:52 #
Dear BaseX team, it's really great that now we have functions json:doc(), csv:doc() and html:doc(). In my opinion it becomes increasingly obvious that BaseX is a powerful data integration platform. Perhaps you will also add the corresponding xxx:doc-available() functions? Kind regards,Hans-Jürgen
CG
Christian Grün30 Aug 2020 21:22 #
Hi Hans-Jürgen,
Quoted text · Hans-Juergen Rennau · 1 line
> Perhaps you will also add the corresponding xxx:doc-available() functions?
Yes, these might be interesting additions. Right now, the semantics of fn:doc currently differs from json:doc, csv:doc and html:doc: The first function is deterministic (i.e., repeated calls will only trigger a single document retrieval) while the others are evaluated just in time (i.e., the document instances are retrieved every time the function is called). Retrieving the same document just once speeds up repeated document access, but it leads to a higher memory consumption (which is one reason why the invocation of fetch:xml – which is also non-deterministic – can be a better choice than fn:doc). We could think about making the other doc functions deterministic as well (and we should certainly update the documentation). Best, Christian

⚡Generated with XQuery