[sqlalchemy] Re: insert to the database

2007-11-09 Thread lur ibargutxi
I have fixed the problem 2007/11/9, lur ibargutxi [EMAIL PROTECTED]: Table definition: tables['indicators'] = Table('indicators', metadata, autoload=True) tables['indicatorgroups'] = Table('indicatorgroups', metadata, autoload=True) ##indicatorgroups table has two columns:

[sqlalchemy] Earn Money Online! No Registration Fees. Guaranteed Payments.

2007-11-09 Thread Riaz Muhammad
http://www.moneycosmos.com/?r=321740 --~--~-~--~~~---~--~~ 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

[sqlalchemy] SQLAlchemy Book... ?

2007-11-09 Thread Palindrom
Hi SQLAlchemists ! Pardon me if this question has already been posted before... But is there any book (or book in preparation) that cover one or more of those subjects : - The SQLAlchemy's History. - The SQLAlchemy's Philosophy. - How to extend and modify the main components of SQLAlchemy. -

[sqlalchemy] Call or Send SMS to any phone anywhere in the world Free!

2007-11-09 Thread Riaz Muhammad
Call or Send SMS to any phone anywhere in the world Free! - http://offr.biz/HLGB7321740QUQKUQA --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] MySQL query parameter binding...

2007-11-09 Thread Bruza
This is driving me nuts... The very very simple SQL query below using :parameter always gives me syntax error. However, the same query using constant '1' then it works fine. I hope this is not because some stupid mistake I made at 4:00 AM... Can anybody help? Thanks, Ben c.execute('select *

[sqlalchemy] Earn Money Online! No Registration Fees. Guaranteed Payments.

2007-11-09 Thread Riaz Muhammad
http://www.moneycosmos.com/?r=321740 --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: mysql exceptions

2007-11-09 Thread Michael Bayer
On Nov 8, 2007, at 10:11 PM, david wrote: Any ideas on how to fix, or what the nature of the issue is, or how to better isolate/debug would be much appreciated. its most lkely concurrent access on a single mysql connection. ensure that you arent sharing a single instance of Session or

[sqlalchemy] Re: SQLAlchemy Book... ?

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 5:56 AM, Palindrom wrote: Hi SQLAlchemists ! Pardon me if this question has already been posted before... But is there any book (or book in preparation) that cover one or more of those subjects : - The SQLAlchemy's History. - The SQLAlchemy's Philosophy. - How to

[sqlalchemy] Re: SQLAlchemy Book... ?

2007-11-09 Thread Palindrom
I will definitively buy both these books when they go out ! Thanks again for your toolkit ! On Nov 9, 3:54 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Nov 9, 2007, at 5:56 AM, Palindrom wrote: Hi SQLAlchemists ! Pardon me if this question has already been posted before... But is

[sqlalchemy] Re: MySQL query parameter binding...

2007-11-09 Thread Michael Bayer
MysqlDB uses format style bind parameters, i.e. %s. if youd like SQLAlchemy to convert :c1 to an appropriate bind param for MySQL, use c.execute(text('select * from t_test where c1=:c1'), {'c1':1}). On Nov 9, 2007, at 6:56 AM, Bruza wrote: This is driving me nuts... The very very simple

[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735

2007-11-09 Thread Michael Bayer
yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it also matches A-C,D,E,, in r3759. On Nov 9,

[sqlalchemy] SQL execution order in the unit of work

2007-11-09 Thread Manlio Perillo
Hi. It seems that from SQLAlchemy 0.3.7(?) the unit of work, after a flush, executes the SQL operations in a different order. As an example, assuming this schema CREATE TABLE A ( x INTEGER PRIMARY KEY ); CREATE TABLE B ( y INTEGER PRIMARY KEY REFERENCES A(x) ); in 0.36 I can

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
what do your Table objects look like ? a ForeignKey() object must be present on the y column of B in order for the unit of work to know the proper order of operations (or the mappers must have explicit primaryjoin/foreign_keys parameters configured). On Nov 9, 10:42 am, Manlio Perillo [EMAIL

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
Sorry, I forgot to add that the mappers A and B must have a relation() specified in order for unit of work to determine the order of operations. this has always been the case in all versions. illustrated in the attached script. --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: MySQL query parameter binding...

2007-11-09 Thread Bruza
By using %s, does that mean MySQL does not support binding of parameter and will have to pass the entire SQL statement as one text string? c.execute(select * from t_test where c1=%s % '1234567') works, but this means the parameter was first substituted into the query string (by Python) before

[sqlalchemy] Re: MySQL query parameter binding...

2007-11-09 Thread jason kirtland
Bruza wrote: By using %s, does that mean MySQL does not support binding of parameter and will have to pass the entire SQL statement as one text string? c.execute(select * from t_test where c1=%s % '1234567') That should be a comma separating the bind values, not a % format operator:

[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735

2007-11-09 Thread sdobrev
yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it also matches A-C,D,E,, in r3759.

[sqlalchemy] Re: MySQL query parameter binding...

2007-11-09 Thread Bruza
Thanks for the explanation. I got it now. This is one more example that the S in SQL was never meant to stand for Standard :-)... Ben On Nov 9, 1:39 pm, jason kirtland [EMAIL PROTECTED] wrote: Bruza wrote: By using %s, does that mean MySQL does not support binding of parameter and will

[sqlalchemy] Re: r3727 / AbstractClauseProcessor problem

2007-11-09 Thread sdobrev
one more error in ACP, took me a day to find and separate. it's very simple and very basic... ClauseAdapter does not work. -- from sqlalchemy import * from sqlalchemy.sql.util import ClauseAdapter m = MetaData() a=Table( 'a',m, Column( 'id',Integer, primary_key=True),

[sqlalchemy] Re: mixed joined+concrete inheritance broken/r3735

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 5:10 PM, [EMAIL PROTECTED] wrote: yeah this is the same thing. if you get A's ID column in there instead of C's the problem would not occuri think this is why our own test suite doesn't have these issues. ive made the A-B FK match previous checkin recursive, so it

[sqlalchemy] Re: SQL execution order in the unit of work

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 4:23 PM, Manlio Perillo wrote: Michael Bayer ha scritto: Sorry, I forgot to add that the mappers A and B must have a relation() specified in order for unit of work to determine the order of operations. this has always been the case in all versions. illustrated in

[sqlalchemy] Re: r3727 / AbstractClauseProcessor problem

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 6:49 PM, [EMAIL PROTECTED] wrote: om sqlalchemy import * from sqlalchemy.sql.util import ClauseAdapter m = MetaData() a=Table( 'a',m, Column( 'id',Integer, primary_key=True), Column( 'xxx_id', Integer, ForeignKey( 'a.id', name='adf', use_alter=True ) ) ) e

[sqlalchemy] Re: r3727 / AbstractClauseProcessor problem

2007-11-09 Thread sdobrev
om sqlalchemy import * from sqlalchemy.sql.util import ClauseAdapter m = MetaData() a=Table( 'a',m, Column( 'id',Integer, primary_key=True), Column( 'xxx_id', Integer, ForeignKey( 'a.id', name='adf', use_alter=True ) ) ) e = (a.c.id == a.c.xxx_id) print e b = a.alias()

[sqlalchemy] Re: r3727 / AbstractClauseProcessor problem

2007-11-09 Thread Michael Bayer
On Nov 9, 2007, at 7:26 PM, Michael Bayer wrote: On Nov 9, 2007, at 6:49 PM, [EMAIL PROTECTED] wrote: om sqlalchemy import * from sqlalchemy.sql.util import ClauseAdapter m = MetaData() a=Table( 'a',m, Column( 'id',Integer, primary_key=True), Column( 'xxx_id', Integer,

[sqlalchemy] stuck on self referrencing mapper thingy

2007-11-09 Thread iain duncan
I've tried to find something similar in the SA 0.3 docs but haven't managed yet. They are dense though so I could easily have missed something. Apologies if this seems a simple problem! :/ I have a product table, some are allowed to be collections ( ie gift basket. ) They will have children,

[sqlalchemy] Re: mysql exceptions

2007-11-09 Thread david
Well, Michael, what you say sounds reasonable. However, I think something more strange is going on (unless I am making a very stupid mistake, which is entirely likely) I am using the current pylons framework. I have tried to follow their recommendations to the letter. All of my queries are in a