Hi guys, Why am I able to add/store several XML with the same path? <rest:database xmlns:rest="http://basex.org/rest" name="TRADES" resources="9 "> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique1.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique2.xml</rest:resource> <rest:resource type="raw" content-type="application/xml" size="21"> henrique2.xml</rest:resource> <rest:resource type="raw" content-type="application/xml" size="21"> henrique3.xml</rest:resource> </rest:database> -- Henrique Oliveira
Why am I able to add/store several XML with the same path?
The REPLACE command [1,2] will remove existing versions of a document. Christian [1] http://docs.basex.org/wiki/Commands#REPLACE [2] http://docs.basex.org/wiki/Database_Module#db:replace
Shouldn't have a 'constraint' to avoid replacing a file? so if the path exists you can use REPLACE but not ADD or STORE cmd 2012/6/6 Christian Grün <christian.gruen@gmail.com>
Why am I able to add/store several XML with the same path?
The REPLACE command [1,2] will remove existing versions of a document. Christian
[1] http://docs.basex.org/wiki/Commands#REPLACE [2] http://docs.basex.org/wiki/Database_Module#db:replace
-- Henrique Oliveira
Why am I able to add/store several XML with the same path? <rest:database xmlns:rest="http://basex.org/rest" name="TRADES" resources="9 "> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique1.xml</rest:resource> <rest:resource type="xml" content-type="application/xml" size="3"> henrique2.xml</rest:resource> <rest:resource type="raw" content-type="application/xml" size="21"> henrique2.xml</rest:resource> <rest:resource type="raw" content-type="application/xml" size="21"> henrique3.xml</rest:resource> </rest:database> Shouldn't be BaseX block it? 2012/6/20 Christian Grün <christian.gruen@gmail.com>
Shouldn't have a 'constraint' to avoid replacing a file? so if the path exists you can use REPLACE but not ADD or STORE cmd
I'm sorry I'm not sure what you want to know. Could you give more details? Christian
-- Henrique Oliveira
Shouldn't be BaseX block it?
You mean that BaseX should not allow adding multiple resources with the same path? There is indeed one open GitHub issue for that: https://github.com/BaseXdb/basex/issues/429 One advantage of the current solution is that new documents can be added extremely fast – exactly because of the missing duplicate check. The main challenge of resolving issue 429 will be to ensure that performance won't suffer too much.
In my opinion it is a critical issue.. should have a way to avoid this.. Regards 2012/6/20 Christian Grün <christian.gruen@gmail.com>
Shouldn't be BaseX block it?
You mean that BaseX should not allow adding multiple resources with the same path? There is indeed one open GitHub issue for that:
https://github.com/BaseXdb/basex/issues/429
One advantage of the current solution is that new documents can be added extremely fast – exactly because of the missing duplicate check. The main challenge of resolving issue 429 will be to ensure that performance won't suffer too much.
-- Henrique Oliveira
participants (2)
-
Christian Grün -
Henrique Oliveira