Hi Jocelyn,
I'm not sure if I understood this correct. You wrote that nested updates in
> Sedna are not supported. So it's not possible to execute a delete statement
> with
> a condition?
>
> I will provide a little example:
> This is my xml document:
> <books>
> <book type="hardcover">
> <title>A Burnt-Out Case</title>
> <author>Graham Greene</author>
> <isbn>0370014995</isbn>
> <price>13.00</price>
> </book>
> <book type="softcover">
> <title>American Psycho</title>
> <author>Bret Easton Ellis</author>
> <isbn>0679735771</isbn>
> <price>14.00</price>
> </book>
> </books>
>
> And now I want to delete the book with the title "American Psycho". I tried
> a
> few different statements but non of them worked properly. My statements
> looked
> like this one:
>
> for $b in doc('books')//books/book
> where $b/title = 'American Psycho'
> return ( update delete $b)
>
The syntax of the delete statement is the following:
update delete Expr
where Expr identifies the nodes to be removed from the database.
So, to delete the book with the title "American Psycho" just run:
update delete doc('books')/books/book[title eq 'American Psycho']
Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion