[sqlalchemy] Link problem on : http://www.sqlalchemy.org/features.html

2010-10-27 Thread werner
the View Current DBAPI Support link on the above page gives a page not found error. Werner -- 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

[sqlalchemy] Create_all() - Create_JustThese(engine, [Table1,Table2,....])?

2010-10-27 Thread Martijn Moeling
Hi, I have a huge definition module where I create Python objects and use declarative. Since not all databases (Multiple for different customers) need all tables I do not like to use create_all is there any way to create just the tables I really need (according to some config list or

Re: [sqlalchemy] Create_all() - Create_JustThese(engine, [Table1,Table2,....])?

2010-10-27 Thread Mike Conley
Check the docs, create_all has an optional tables= parameter. On Oct 27, 2010 8:18 AM, Martijn Moeling mart...@xs4us.nu wrote: Hi, I have a huge definition module where I create Python objects and use declarative. Since not all databases (Multiple for different customers) need all tables I do

Re: [sqlalchemy] How to force a before_update() run without changes to instrumented attributes

2010-10-27 Thread Michael Bayer
On Oct 27, 2010, at 11:43 AM, Nikolaj wrote: I have a mapped class called Widget, with an uninstrumented attribute called 'owner' (i.e. it does not have a column representation). Widget has a MapperExtension with a before_update() method that runs a couple of queries using

Re: [sqlalchemy] Storing lists of simple strings

2010-10-27 Thread Michael Bayer
On Oct 27, 2010, at 12:50 PM, Torsten Landschoff wrote: Replacing the Sheet class and following code like this, I can at least access the names list as if it really was a simple list. class Sheet(Base): __tablename__ = sheet sheet_id = Column(sheet_id, Integer, primary_key=True)

[sqlalchemy] Re: How to force a before_update() run without changes to instrumented attributes

2010-10-27 Thread Nikolaj
Can you give an example of a forwards-compatible way to modify an attribute to mark the instance dirty without creating actual net changes? SA seems quite good at detecting my tricks. On Oct 27, 6:41 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 27, 2010, at 11:43 AM, Nikolaj wrote:

Re: [sqlalchemy] Re: How to force a before_update() run without changes to instrumented attributes

2010-10-27 Thread Michael Bayer
if you just set it to itself, that emits a change event. You could also set it to something like the current timestamp, and have your before_update() extension expire the changes on it after detection. On Oct 27, 2010, at 1:48 PM, Nikolaj wrote: Can you give an example of a

[sqlalchemy] Re: Working with mapper objects without saving them

2010-10-27 Thread Michael Elsdörfer
Thanks, that looks like pretty much the thing I need. Although, as a note, I mostly define my relationships in the opposite direction than then example in the documentation; That is, I define a order relationship in the Item model, with a items backref, which I suppose is just a question of

[sqlalchemy] 'Lookup' Tables

2010-10-27 Thread Mark Erbaugh
I have a data graph mapped as: class BatchDetail(BASE): __tablename__ = TABLE_BATCH_DET id = Column(Integer, primary_key=True) batch = Column(ForeignKey(TABLE_BATCH_HDR + '.id')) account_id = Column(ForeignKey(TABLE_L3_ACCT + '.id')) # other fields #

Re: [sqlalchemy] 'Lookup' Tables

2010-10-27 Thread Mark Erbaugh
On Oct 27, 2010, at 2:36 PM, Mark Erbaugh wrote: I have a data graph mapped as: class BatchDetail(BASE): __tablename__ = TABLE_BATCH_DET id = Column(Integer, primary_key=True) batch = Column(ForeignKey(TABLE_BATCH_HDR + '.id')) account_id =

[sqlalchemy] how to use object_session properly

2010-10-27 Thread anusha k
hello all I want to know how to create Session with object_session which can be used to add data to the database i.e using Session.add_all().So i can pass a list as parameter to add_all as my length of list is of variable length. When i am trying to do that i was not able to associate instance

[sqlalchemy] I've got an InterfaceError without reason

2010-10-27 Thread justin
I have a table in my db, named nameConversions. The scheme is as follows: nameConversions = Table('nameConversions', metadata, Column('ConversionID', Integer, primary_key=True), Column('TaxonCode', String(lenAbbr), nullable=False), Column('Note', String(1), nullable=False),

Re: [sqlalchemy] I've got an InterfaceError without reason

2010-10-27 Thread Michael Bayer
On Oct 27, 2010, at 5:06 PM, justin wrote: I have a table in my db, named nameConversions. The scheme is as follows: nameConversions = Table('nameConversions', metadata, Column('ConversionID', Integer, primary_key=True), Column('TaxonCode', String(lenAbbr), nullable=False),