[sqlalchemy] Re: complex update query

2012-03-09 Thread yannack
Amazing reply! thanks a lot Mike, as usual, top notch :) On Thursday, March 8, 2012 11:33:55 AM UTC+1, yannack wrote: > > Hello list, > I have the following models (excerpt) which represent a scoring system > (the score is the "extra" value, it is linked to a scorecard):

[sqlalchemy] complex update query

2012-03-08 Thread yannack
Hello list, I have the following models (excerpt) which represent a scoring system (the score is the "extra" value, it is linked to a scorecard): class Scoring(Base): __tablename__ = 'scraper_scoring' scoring_id = Column('id',Integer, primary_key=True) extra = Column(Integer, index=Tru

[sqlalchemy] Re: String matching

2012-02-08 Thread yannack
Great, thanks for this, I will definitely play around with this. Lots of great tools and links here! However, I do have a remark for Mike: you suggest ('%' + literal(custom_string) + '%').ilike('%' + MyClass.column + '%') While this probably works for PGSQL (haven't tested though), in sqlite it won

[sqlalchemy] String matching

2012-02-07 Thread yannack
Hello list, I have the following problem. I wish to query my database to look for columns with names included in, or including, a given string. is there a way to do the opposite of "contains", ie, a "contained" method for string columns? Right now, I am doing the following: session.query(Parcours)