REPLACE vs STORE

Thursday, 14 November 2019 · 3 messages
R
radim-havlicek14 Nov 2019 10:52 #
Hello, I would like to store new reports into existing database folder (with other existing files already) after opening. Help: REPLACE Syntax REPLACE [path] [input] XML Syntax <replace path='...'>[input]</replace> STORE Syntax STORE (TO [path]) [input] XML Syntax <store (path='...')>[input]</store> But actually I encountered this problem:
Quoted text · 1 line
> open mydb
Database 'mydb' was opened in 3.0 ms.
Quoted text · 1 line
> replace /Report/ c:/Share/REPORTS/
903 resource(s) replaced in 11077.73 ms.
Quoted text · 1 line
> store to /Report/ c:/Share/REPORTS/
Resource "C:/Share/REPORTS/" not found. What am I doing wrong? Is it possible to use store to instead of replace to just add files to existing ones? Thanks in advance for your answer, Radim Havlicek
CG
Christian Grün14 Nov 2019 18:30 #
Hi Radim, The STORE command is restricted to single files [1]. XQuery and db:store (e.g. combined with file:list) gives you more flexibility here. Hope this helps, Christian [1] http://docs.basex.org/wiki/Commands#STORE
Quoted text · AM · 27 lines
On Thu, Nov 14, 2019 at 10:53 AM <radim-havlicek at post.cz> wrote: > > Hello, > I would like to store new reports into existing database folder (with other existing files already) after opening. > > Help: > REPLACE > Syntax REPLACE [path] [input] > XML Syntax <replace path='...'>[input]</replace> > > STORE > Syntax STORE (TO [path]) [input] > XML Syntax <store (path='...')>[input]</store> > > But actually I encountered this problem: > > open mydb > Database 'mydb' was opened in 3.0 ms. > > replace /Report/ c:/Share/REPORTS/ > 903 resource(s) replaced in 11077.73 ms. > > store to /Report/ c:/Share/REPORTS/ > Resource "C:/Share/REPORTS/" not found. > > What am I doing wrong? Is it possible to use store to instead of replace to just add files to existing ones? > > Thanks in advance for your answer, > > Radim Havlicek
CG
Christian Grün14 Nov 2019 20:18 #
Quoted text · Christian Grün · 1 line
> Thank you for your answer. Do you plan something like that in future? We face the problem we need to upload tens thousands of files in 4 hours per week. We are able to do it with replace with folder, but current store per file is too slow. :-(
Have you already tried the XQuery way? If so, and if it’s too slow, feel free to share your code with us.
Quoted text · Christian Grün · 50 lines
> Odesláno z mého chytrého telefonu Samsung Galaxy. > > -------- Původní zpráva -------- > Od: Christian Grün <christian.gruen at gmail.com> > Datum: 14.11.19 18:30 (GMT+01:00) > Komu: Radim Havlicek <radim-havlicek at post.cz> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > Předmět: Re: [basex-talk] REPLACE vs STORE > > Hi Radim, > > The STORE command is restricted to single files [1]. XQuery and > db:store (e.g. combined with file:list) gives you more flexibility > here. > > Hope this helps, > Christian > > [1] http://docs.basex.org/wiki/Commands#STORE > > > > > On Thu, Nov 14, 2019 at 10:53 AM <radim-havlicek at post.cz> wrote: > > > > Hello, > > I would like to store new reports into existing database folder (with other existing files already) after opening. > > > > Help: > > REPLACE > > Syntax REPLACE [path] [input] > > XML Syntax <replace path='...'>[input]</replace> > > > > STORE > > Syntax STORE (TO [path]) [input] > > XML Syntax <store (path='...')>[input]</store> > > > > But actually I encountered this problem: > > > open mydb > > Database 'mydb' was opened in 3.0 ms. > > > replace /Report/ c:/Share/REPORTS/ > > 903 resource(s) replaced in 11077.73 ms. > > > store to /Report/ c:/Share/REPORTS/ > > Resource "C:/Share/REPORTS/" not found. > > > > What am I doing wrong? Is it possible to use store to instead of replace to just add files to existing ones? > > > > Thanks in advance for your answer, > > > > Radim Havlicek

⚡Generated with XQuery