I implemented another solution for the moment: I executed a transaction (PHP
sedna_execute doc("doc", "collection")) to retrieve the whole content of the
source document, stored it in a variable and loaded it (PHP sedna_load) in
the new document.
My documents are not very large. I didn't see problems of performance. Maybe
for documents larger than mine, it's not a good idea.
Another idea that I tried to develop is the following: to execute a command
line through PHP that uses the LOAD STDIN function of SEDNA. But I couldn't
figure out to use it with a command line. I tried the following: se_term
-query 'doc("cff", "2010")' etax | se_term -query "LOAD STDIN 'cff' '2011'"
etax.
Julien Barbedette
On Wed, Feb 16, 2011 at 3:30 PM, Ivan Shcheklein <shchekl...@gmail.com>wrote:
> Hi Julien,
>
>
> I did find nothing in the documentation about an eventual tool to
>> duplicate a document.
>> Is there a simple way to do that? Or which solution could be the most
>> appropriated to do it (I use the PHP API)?
>>
>
>
> You may create an empty document in the destination collection and insert
> root element (and any other top-level nodes) from the source document:
>
> (: begin transaction :)
> create document 'duplicate' in collection '2011'
> update insert doc('source', '2010')/* into doc('duplicate', '2011')
> (: commit transaction :)
>
>
> Ivan Shcheklein,
> Sedna Team
>
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion