hi ,
I am very new to couchdb, in my design , i just keep parent id of
each documents.
such as if i would like to delete B, i know that to delete C(have B id) and
then I have find and
to delete E(have c id).... etc.
my question is ....
1. is this possible ????
2. how do i pass the document id (such as B) to view that i would like
to search and delete document under its?
3. dose couchdb support delete document in view or i have to query all
of them than use http api to delete ?
thanks for every ideas
A.
-------- Original Message --------
Subject:
Re: Delete document Tree Structure
Date:
Thu, 27 May 2010 06:43:58 +0200
From:
J Chris Anderson <[email protected]>
Reply-To:
[email protected] <[email protected]>
To:
[email protected] <[email protected]>
On May 26, 2010, at 8:48 PM, Aun... สุวพรหม wrote:
>
>
> Hi,
>
> I design document in couchdb to have relation something like
>
> directory
> |
> A---------D
> |
> B---------C
> |
> |
> E ------F
>
> if i would like to http (DELETE B) will delete all down documents
> what is the possible solution to use.
>
> 1. can i create view and find relation and delete all of
> them ?
> 2. get relation by higher programming api (C#,PHP) and
> then delete each one?
> 3. Do you have any solution to suggest on this.....?
>
It is common to store the full path to each item, on the item, so you'd have
B > C > E > F stored on F
then you can view easily across the tree.
however, reparenting a node, (say, moving B to become a child of D) require
asynchronous processing or a bulk docs request and is not transactional.
Chris
>
> Thanks,
> A.
>
>
>
> _________________________________________________________________
> Hotmail: บริการอีเมลฟรี ที่เชื่อถือได้ และสมบูรณ์พร้อม
> https://signup.live.com/signup.aspx?id=60969
_________________________________________________________________
Hotmail: อีเมลที่เชื่อถือได้ซึ่งมาพร้อมกับการป้องกันอีเมลขยะที่มีประสิทธิภาพของ
Microsoft
https://signup.live.com/signup.aspx?id=60969