[sqlalchemy] mapping of Wordpress taxonomy tables

2008-05-05 Thread Max Ischenko
Hello, My python app uses Wordpress blog database and my sqlalchemy mappings recently broke due to Wordpress update. Can someone pls help to map the following taxonomy tables into SA? http://codex.wordpress.org/WordPress_Taxonomy I kind of stuck with sqlalchemy.exceptions.ArgumentError: Error

[sqlalchemy] Re: expensive .rollback() in pool implementation?

2008-05-05 Thread Andrew Stromnov
Ordered by: internal time List reduced from 178 to 20 due to restriction 20 ncalls tottime percall cumtime percall filename:lineno(function) # 2150.3710.0020.3710.002 {method 'query' of '_mysql.connection' objects} * 2150.3060.0010.3060.001 {method 'rollback'

[sqlalchemy] Doubt in forming a dynamic query

2008-05-05 Thread Roopesh
Hi, I have a very basic doubt in using sqlalchemy. My query is as follows. My requirement is to test the inclusion or exclusion of a list of values for a particular field. result = session.execute( select([ table1.c.address,

[sqlalchemy] Re: arbitrary information for sa objects

2008-05-05 Thread az
IMvhO: - table / columns are DB-side terms, relations - sqlalchemy.orm.relation() - are not really. They are more ORM. Foreign keys/Constraints are DB-side, yes. But if annotate relations, then mappers should follow... as they talk of mappers and then keys/joins. TO me, keeping the OO

[sqlalchemy] Re: arbitrary information for sa objects

2008-05-05 Thread alex bodnaru
we were talking conceptually, of course :) [EMAIL PROTECTED] wrote: IMvhO: - table / columns are DB-side terms, relations - sqlalchemy.orm.relation() - are not really. They are more ORM. Foreign keys/Constraints are DB-side, yes. But if annotate relations, then mappers should

[sqlalchemy] Re: expensive .rollback() in pool implementation?

2008-05-05 Thread Michael Bayer
thanks for the effort. Please use r4640 and specify rollback_returned=False to the Pool constructor. On May 5, 2008, at 5:53 AM, Andrew Stromnov wrote: Ordered by: internal time List reduced from 178 to 20 due to restriction 20 ncalls tottime percall cumtime percall

[sqlalchemy] Re: Doubt in forming a dynamic query

2008-05-05 Thread Michael Bayer
On May 5, 2008, at 9:10 AM, Roopesh wrote: How can I do something like: table2.c.domain in ['naukri.com', 'gmail.com', 'yahoo.com'] Also how can I do something like table2.c.domain not in ['naukri.com', 'gmail.com', 'yahoo.com'] use the in_ method, column.in_(['naukri.com', 'gmail.com',

[sqlalchemy] Re: expensive .rollback() in pool implementation?

2008-05-05 Thread jason kirtland
Michael Bayer wrote: thanks for the effort. Please use r4640 and specify rollback_returned=False to the Pool constructor. I changed that name in r4643 to 'reset_on_return'. I'm hoping to be able to support database-specific methods for state reset in 0.5, and the new option name is a

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-05-05 Thread Allen Bierbaum
Thanks for the help. I almost have this up and running, but I have found one preplexing issue. My current code base has a very extensive test suite. As part of this test suite, I have my test fixtures setup and teardown databases, mappers, and just about every SA related. This is meant to

[sqlalchemy] Goofy Association Table

2008-05-05 Thread Matt Haggard
I've got a kind of goofy schema, and I'm trying to map it. I've got Questionnaire types, Sections and Questions all joined in a single association table: join_table : type_id | section_id | question_id questions_table : id | question_text sections_table : id | section_name types_table : id |

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-05-05 Thread Michael Bayer
On May 5, 2008, at 5:04 PM, Allen Bierbaum wrote: Is there some way to clear the declarative layer and have it regenerate all automatically created metadata and mappers? not as of yet but this could be done. but if you are using declarative, that implies that for a class X there is only

[sqlalchemy] Re: Goofy Association Table

2008-05-05 Thread Michael Bayer
On May 5, 2008, at 5:11 PM, Matt Haggard wrote: I've got a kind of goofy schema, and I'm trying to map it. I've got Questionnaire types, Sections and Questions all joined in a single association table: join_table : type_id | section_id | question_id questions_table : id | question_text

[sqlalchemy] Re: Using declarative when imports happen before create_engine() ??

2008-05-05 Thread Allen Bierbaum
On Mon, May 5, 2008 at 4:29 PM, Michael Bayer [EMAIL PROTECTED] wrote: On May 5, 2008, at 5:04 PM, Allen Bierbaum wrote: Is there some way to clear the declarative layer and have it regenerate all automatically created metadata and mappers? not as of yet but this could be done. but

[sqlalchemy] Re: Ordered merge of shard results (update)

2008-05-05 Thread Kyle Schaffrick
On Sat, 3 May 2008 07:03:56 -0400 Kyle Schaffrick [EMAIL PROTECTED] wrote: I'm in the process now of rebasing against user_defined_state. I just got done uploading the rebased series. That little rowtuple change turned out to be the biggest headache to adapt to :) In any

[sqlalchemy] column name must be lowercase for CheckConstraint.

2008-05-05 Thread James Su
If you define a column with column name contains capital letter, and define CheckConstraint for this column, then DDL issued by SA will be wrong. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To

[sqlalchemy] Re: Doubt in forming a dynamic query

2008-05-05 Thread Roopesh
use the in_ method, column.in_(['naukri.com', 'gmail.com', 'yahoo.com']), not_(column.in_(['naukri.com', 'gmail.com', 'yahoo.com'])) . But when I do this, I am getting an error as follows: not_(msg_headers.c.email_domain.in_['naukri.com','yahoo.com','hotmail.com']), TypeError:

[sqlalchemy] Re: Doubt in forming a dynamic query

2008-05-05 Thread az
On Tuesday 06 May 2008 07:40:36 Roopesh wrote: use the in_ method, column.in_(['naukri.com', 'gmail.com', 'yahoo.com']), not_(column.in_(['naukri.com', 'gmail.com', 'yahoo.com'])) . But when I do this, I am getting an error as follows: