[sqlalchemy] can't connect with 0.5rc4 (pylons)

2008-11-21 Thread Anil
bash-3.2$ paster setup-app development.ini ... File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc4-py2.5.egg/ sqlalchemy/engine/strategies.py", line 81, in connect raise exc.DBAPIError.instance(None, None, e) sqlalchemy.exc.OperationalError: (OperationalError) (1045, "Access denied fo

[sqlalchemy] Re: Insert.params() broken?

2008-11-21 Thread Michael Bayer
bukzor wrote: > > Thanks for explaining. My problem was that I thought the insert values > would be implemented as bindparams. they are implemented as bindparams. I just wrote them "inline" here to illustrate the difference functionally. --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: Insert.params() broken?

2008-11-21 Thread bukzor
On Nov 20, 6:20 pm, Empty <[EMAIL PROTECTED]> wrote: > > Different, but related question: How do I print out the statement in > > "copy-paste-able" format? More specifically, how do i get an ordered > > list of bound values out of the statement? > > > This code does what I want, but it's really cl

[sqlalchemy] Re: Insert.params() broken?

2008-11-21 Thread bukzor
On Nov 20, 7:39 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Nov 20, 2008, at 9:05 PM, bukzor wrote: > > > Would it make sense to rename Insert.values to Insert.params? Or make > > Insert.params call Insert.values. > > It seems quite strange for an object to have functions that aren't > > usa

[sqlalchemy] Re: how to write a dirty relation to the db?

2008-11-21 Thread robert rottermann
found it out myself. a commit was missing thanks for your time robert robert rottermann schrieb: > Hi there, > I try to grasp relations .. > > I have an m:n association between two tables. > > this is what I do: > engine = sa.create_engine('mysql://[EMAIL PROTECTED]/energie_2', echo=True) > Sessio

[sqlalchemy] how to write a dirty relation to the db?

2008-11-21 Thread robert rottermann
Hi there, I try to grasp relations .. I have an m:n association between two tables. this is what I do: engine = sa.create_engine('mysql://[EMAIL PROTECTED]/energie_2', echo=True) Session = sessionmaker(bind=engine) session = Session() this is what I have: tblPersonTable and tblSupplierTable der

[sqlalchemy] from sqlalchemy all() to subquery to threaded process?

2008-11-21 Thread Lukasz Szybalski
Hello, I am pulling a list of files I need to print from a database and I have all the records after doing the sqlalchemy query with .all() Now I have a list of 3000 files I need to print, around 3 files per userID, I want to print all 3 at the same time in different threads, and my only require

[sqlalchemy] Re: Cross Join

2008-11-21 Thread Michael Bayer
cross joins can be performed using implicit cross join. no ON CLAUSE is needed: select([a_o, b_o]) On Nov 21, 2008, at 6:49 AM, Ash wrote: > > Hello, > > I want to know how to implement the cross join using sqlalchemy > > I create the metadata say metadata > > i have table a and b which i w

[sqlalchemy] Re: ORM mapping with Elixir compared to raw cursor query

2008-11-21 Thread Sina Samangooei
On 21 Nov 2008, at 03:32, Michael Bayer wrote: > > > On Nov 20, 2008, at 8:47 PM, Michael Bayer wrote: > >>> The first scenario is a single table with 24,000 rows. The problem >>> is >>> that using SQLAlchemy through Elixir to map this table to an object, >>> and performing a fairly naive Mapp

[sqlalchemy] Cross Join

2008-11-21 Thread Ash
Hello, I want to know how to implement the cross join using sqlalchemy I create the metadata say metadata i have table a and b which i want to cross join. a_o = sqlalchemy.Table('a',metadata,autoload=True) b_o = sqlalchemy.Table('b',metadata,autoload=True) j = join(a_o,b_o, onclause=a_o.c.b_i

[sqlalchemy] Re: ORM mapping with Elixir compared to raw cursor query

2008-11-21 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of SinJax > Sent: 21 November 2008 10:43 > To: sqlalchemy > Subject: [sqlalchemy] Re: ORM mapping with Elixir compared to > raw cursor query > [SNIP] > sql = """ > SELECT annotations.id AS a

[sqlalchemy] Re: ORM mapping with Elixir compared to raw cursor query

2008-11-21 Thread az
On Friday 21 November 2008 12:42:31 SinJax wrote: and another way: allAnn = Annotation.query( ).join( 'user').filter_by( py_user = "msn" ).reset_joinpoint().filter( Annotation.subject == somesubject ) and allAnn = Annotation.query( ).filter_by( subject = somesubject ).join( 'user'

[sqlalchemy] Re: ORM mapping with Elixir compared to raw cursor query

2008-11-21 Thread az
> The result of this query is 23 rows from a 24,000 row table. > > I show a query i constructed by hand (Get every annotation of user > "msn" on subject "2") as i would run using MysqlDb and cursor. I > time this by measuring the time taken between executing the query > and putting each result in

[sqlalchemy] Re: ORM mapping with Elixir compared to raw cursor query

2008-11-21 Thread SinJax
I had a feeling the bulk nature of the query would confuse the matter so i have performed some more tests with a slightly more restricted query with similarly poor results. I have not posted much on mail lists much so if it is inappropriate to post code i apologise. Here is my code: