Many XML with the same path
Quoted text · Henrique Oliveira · 1 line
> 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
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>Quoted text · Henrique Oliveira · 3 lines
> 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
Quoted text · Henrique Oliveira · 1 line
> 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.
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 at gmail.com>
Quoted text · Christian Grün · 8 lines
> > 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 >
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 at gmail.com>
Quoted text · Christian Grün · 7 lines
> > 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 >
In my opinion it is a critical issue.. should have a way to avoid this..
Regards
2012/6/20 Christian Grün <christian.gruen at gmail.com>
Quoted text · Christian Grün · 12 lines
> > 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. >
Written for BaseX 7.2, 7.3. BaseX may have changed since: please check the current documentation.