[sqlalchemy] Auto-generated Code?

2009-10-23 Thread Stone Puzzle
Is there a way or lib to help us generating python* code *of all of the tables and relations automatically from a existing database? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: Auto-generated Code?

2009-10-23 Thread Tefnet Developers - Tomasz Jezierski
Dnia 2009-10-23, Pt o godzinie 15:00 +0800, Stone Puzzle pisze: Is there a way or lib to help us generating python code of all of the tables and relations automatically from a existing database? http://turbogears.org/2.1/docs/main/Utilities/sqlautocode.html Tomasz Jezierski Tefnet

[sqlalchemy] Re: Auto-generated Code?

2009-10-23 Thread Stone Puzzle
I have tried it, it's great, thanks! On Fri, Oct 23, 2009 at 3:19 PM, Tefnet Developers - Tomasz Jezierski develop...@tefnet.pl wrote: Dnia 2009-10-23, Pt o godzinie 15:00 +0800, Stone Puzzle pisze: Is there a way or lib to help us generating python code of all of the tables and

[sqlalchemy] Re: not expected generated update query values

2009-10-23 Thread sector119
Thanks a lot, Michael! On Oct 23, 4:09 am, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 22, 2009, at 3:26 PM, sector119 wrote: Something strange, Michael.. All bindparams are different. Compliller should not add to SET all params if values() has bindparam args, no? where()

[sqlalchemy] own compiler visit_update method

2009-10-23 Thread sector119
Hi! Is it possible to easily add tables to FROM clause, now I use following code to append additional table names but it look like a hack.. at PGCompiler.visit_update() I see self.stack.append({'from': set ([update_stmt.table])}) where and how it's used, may be using this I can append some

[sqlalchemy] can't import ARRAY from dialects.postgresql

2009-10-23 Thread sector119
Is there something wrong with ARRAY type in SA 0.6? no dialects/ dialect/__init__.py has ARRAY at __all__ !? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Re: can't import ARRAY from dialects.postgresql

2009-10-23 Thread sector119
It's on trunk. Elso can't import orm from sqlalchemy :/ On Oct 23, 6:00 pm, sector119 sector...@gmail.com wrote: Is there something wrong with ARRAY type in SA 0.6? no dialects/ dialect/__init__.py has ARRAY at __all__ !? --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: can't import ARRAY from dialects.postgresql

2009-10-23 Thread Michael Bayer
sector119 wrote: It's on trunk. Elso can't import orm from sqlalchemy :/ On Oct 23, 6:00 pm, sector119 sector...@gmail.com wrote: Is there something wrong with ARRAY type in SA 0.6? no dialects/ dialect/__init__.py has ARRAY at __all__ !? ARRAY type is only within postgresql. You'd have

[sqlalchemy] Re: own compiler visit_update method

2009-10-23 Thread Michael Bayer
sector119 wrote: Hi! Is it possible to easily add tables to FROM clause, now I use following code to append additional table names but it look like a hack.. at PGCompiler.visit_update() I see self.stack.append({'from': set ([update_stmt.table])}) where and how it's used, may be using

[sqlalchemy] Re: Saved Queries (or text representation of the SQL)

2009-10-23 Thread jeff
I would like to save a number of these in a database so size is important (the serialized select() was somewhat large...) so I would like to get the string representation of the raw SQL directly useable by sqlalchemy if possible. As I have in my examples, the str(select) doesn't seem directly

[sqlalchemy] Re: David Bolen on SA and Twisted

2009-10-23 Thread David Bolen
Don Dwiggins d...@dondwiggins.net writes: Hmmm, Could you elaborate a bit about the self-contained? I do have some cases where I fire off a deferredList with several (independent) queries in it. Might that be problematic? My guess is that your independent comment is essentially the same

[sqlalchemy] Re: Saved Queries (or text representation of the SQL)

2009-10-23 Thread Mike Conley
On Fri, Oct 23, 2009 at 12:45 PM, jeff jeff.sie...@seagate.com wrote: I would like to save a number of these in a database so size is important (the serialized select() was somewhat large...) so I would like to get the string representation of the raw SQL directly useable by sqlalchemy if

[sqlalchemy] Re: Saved Queries (or text representation of the SQL)

2009-10-23 Thread Michael Bayer
jeff wrote: I would like to save a number of these in a database so size is important (the serialized select() was somewhat large...) using serializer() ? really? if you do a naive dumps() with plain pickle, yes the serialize would be huge. so I would like to get the string

[sqlalchemy] Re: Saved Queries (or text representation of the SQL)

2009-10-23 Thread Mike Conley
On Fri, Oct 23, 2009 at 1:47 PM, Michael Bayer mike...@zzzcomputing.comwrote: Much easier to use serializer. I agree with that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this

[sqlalchemy] Re: Shallow copying

2009-10-23 Thread Mike Conley
On Fri, Oct 23, 2009 at 12:40 PM, Joril jor...@gmail.com wrote: Hi everyone! I'm trying to automatically build a shallow copy of a SA-mapped object.. At the moment my function is just: newobj = src.__class__() for prop in class_mapper(src.__class__).iterate_properties: setattr(newobj,