Hi again,

On Aug 4, 5:41 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:

<snip>

> no, youre free to order by whatever crierion youd like.  the examples
> return the nodes in insert order and will duplicate the input document.

<snip>

> you can order by whatever you like.  the example is ordering in the
> identical order as the source document but this can be changed.

<snip>

> er, records are inserted in the order they're read from the source XML.

The XML I showed was just an example to illustrate my problem. Sorry
if this was confusing. Right now, I have an application that uses XML,
it's true, but I'm rewriting the whole application. So I just won't
have any XML input. I need to create a playlist _from_scratch_ stored
in a database; no XML (I will later export the playlist from the
database to XML, but that's another thing). I did see that the example
you provided takes an XML file as input. The tree is walked and
translated to the database. So you're able to keep the order as each
node is inserted one by one as the XML file is beeing traversed, which
naturally makes increments of the integer primary key ID field. But it
won't work like this for me.

> if you wanted to support direct mutation operations on Node objects
> without mass deletes/inserts, add an "orderby" column to the nodes
> table and use a recipe like OrderingList:  http://www.sqlalchemy.org/
> docs/plugins.html#plugins_orderinglist
>
> hope this helps...

Aaah, yes, this might help. I'll have to look on that orderinglist. It
apparently does exactly what I need. Thanks !

Regards,
Alex


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to