I mean if we try to access the DB without "client:connect" e.g. :
if (collection("BIG-DB")/*:node[*:id=3/*:status = 'true') then _:todoFunc("") else ()
That would be an access to the DB without "client:connect" if I code it like that more than once I always get the error: "The Database is already in use". Because they block each other. For example if I add this to it:
let $anotherquery := collection("BIG-DB")/*:node
Regards, Sumit
-----Ursprüngliche Nachricht----- Von: Christian Grün [mailto:christian.gruen@gmail.com] Gesendet: Samstag, 18. Juni 2016 14:40 An: Kapoor, Sumit Sumit.Kapoor@adesso.de Cc: basex-talk@mailman.uni-konstanz.de Betreff: Re: [basex-talk] client:connect reference to DB or storage in RAM (loss in performance?)
If I open a connection, send a query and close the connection: What do I get? Just a Copy of the Database which will be stored in the core/main memory or a reference to the DB? Here a Code Example:
You will always get a copy of the database node. As you may have seen in the documentation of the Client Module, you should never use it to address the same BaseX instance, as this can cause deadlocks.
We have to use such a workaround with „client:connect“ because if we try to access directly the DB more than once it will be blocked.
Do you have more details? Christian
------------------------------------------------------- >>> business. people. technology. <<< -------------------------------------------------------
adesso AG mit Sitz in Dortmund Vorstand: Michael Kenfenheuer (Vors.), Christoph Junge, Andreas Prenneis Vorsitzender des Aufsichtsrates: Prof. Dr. Volker Gruhn Amtsgericht Dortmund HRB 20663