11 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: sqlalchemy introspec...
FromSent OnAttachments
johnny27 Apr 2007 07:02 
Andreas Jung27 Apr 2007 07:08 
johnny27 Apr 2007 12:56 
Andreas Jung27 Apr 2007 22:59 
黄毅27 Apr 2007 23:01 
johnny28 Apr 2007 09:00 
Andreas Jung28 Apr 2007 09:05 
johnny03 May 2007 16:07 
Michael Bayer03 May 2007 18:58 
johnny04 May 2007 13:08 
Michael Bayer04 May 2007 13:21 
Subject:[sqlalchemy] Re: sqlalchemy introspection How?
From:黄毅 (yi.c@gmail.com)
Date:04/27/2007 11:01:25 PM
List:com.googlegroups.sqlalchemy

On 4/28/07, johnny <ramp@gmail.com> wrote:

Does this create a Object Mappers for those tables, so I can do the following:

Lets say I have a table called "user" with columns "user_name" and "password".

ed = User() ed.user_name = 'Ed' ed.password = 'edspassword' session.save(ed)

metadata = BoundMetaData('dburi') user_table = table('user', metadata, autoload=True) class User(object): pass mapper(User, user_table) # then ed = User() ed.user_name = 'Ed' ed.password = 'edspassword' session.save(ed)