Re: [sqlalchemy] Storing Nested Lists

2010-04-27 Thread David Gardner
What database are you using? Postgres (and possibly others) support an 
array type.



On 04/25/2010 02:58 PM, greg wrote:

Hi All,

I'm new to sqlalchemy.  I've been reading the documentation and group
archives, but can't really find an answer to my question.  I suspect
it's a question of terminology, and that I don't really know the term
for what I'm looking for.
Can I map a nested list to one column, and have my nested list
returned to me intact?  A simple example is a list like:

['a','b','c', ['x','y','z',['m','n','o']]]

If anyone can point me in the right direction, I'd much appreciate it.
Thanks.

   



--
David Gardner
Pipeline Tools Programmer
Jim Henson Creature Shop
dgard...@creatureshop.com


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



RE: [sqlalchemy] Storing Nested Lists

2010-04-26 Thread King Simon-NFHD78
 -Original Message-
 From: sqlalchemy@googlegroups.com 
 [mailto:sqlalch...@googlegroups.com] On Behalf Of greg
 Sent: 25 April 2010 22:59
 To: sqlalchemy
 Subject: [sqlalchemy] Storing Nested Lists
 
 Hi All,
 
 I'm new to sqlalchemy.  I've been reading the documentation and group
 archives, but can't really find an answer to my question.  I suspect
 it's a question of terminology, and that I don't really know the term
 for what I'm looking for.
 Can I map a nested list to one column, and have my nested list
 returned to me intact?  A simple example is a list like:
 
 ['a','b','c', ['x','y','z',['m','n','o']]]
 
 If anyone can point me in the right direction, I'd much appreciate it.
 Thanks.
 

If you make the column a PickleType:

 
http://www.sqlalchemy.org/docs/reference/sqlalchemy/types.html#sqlalchem
y.types.PickleType

...it should behave as you want.

Simon

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