> from sqlalchemy import *
>
> metadata = MetaData()
> docs = Table('docs', metadata)
> docs.append_column(Column('DocID', Integer, primary_key=True))
> docs.append_column(Column('Path', String(120)))
> docs.append_column(Column('Complete', Boolean))
>
> class Doc(object):
>     def __init__(self, id, path, state):
>         self.DocID = id
>         self.Path = path
>         self.Complete = state
>
>     def __str__(self):
>         return '(%s) %s %s' %(self.DocID, self.Path, self.Complete)
>
> if __name__ == "__main__":
>     mapper(Doc, docs)
>
>     db = create_engine( 'sqlite:///mydb' )
>     db.echo = False
>
>     s = create_session(bind_to = db)
>     q = s.query(Doc)


i'm no expert but i dont see where u bind the metadata to the db.
u are binding the session - which isn't needed usualy.

--~--~---------~--~----~------------~-------~--~----~
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