[sqlalchemy] Re: connect data base

2008-10-15 Thread Kyle Schaffrick
On Tue, 14 Oct 2008 18:33:10 +0200 Werner F. Bruhin [EMAIL PROTECTED] wrote: Please check Kyle's answer to your first post. Perhaps Google Groups is having mail delivery issues (again), so I'll just repeat/clarify :) On Tue, 14 Oct 2008 08:57:14 -0700 (PDT) victoria [EMAIL PROTECTED] wrote:

[sqlalchemy] Error writing file

2008-10-15 Thread Heston James - Cold Beans
Guys, Got an unusual error this morning when running a query, I keep getting: Error writing file '/tmp/MYHo980S' (Errcode: 28) Thrown at me, any ideas what this is all about? What is it trying to write to the FS? Cheers, Heston

[sqlalchemy] Re: connect data base

2008-10-15 Thread nesrine nesrine
I fix an ordianary user with password, but I have the same error. I think that this problem is from file configure pg_hda.conf, but I not find tutorial witch has instruction about change in this file. think very much for your helps. --~--~-~--~~~---~--~~ You

[sqlalchemy] Is this a transaction?

2008-10-15 Thread Heston James - Cold Beans
Quick question I hope guys. If I have an object which contains a bunch of children and cascade is set on the relationships. When I add the parent object to the session and commit it, are the children saved as part of a transaction by default? Or do I have to do something special? If I

[sqlalchemy] Re: Is this a transaction?

2008-10-15 Thread Wayne Witzel
On Oct 15, 11:37 am, Heston James - Cold Beans [EMAIL PROTECTED] wrote: Quick question I hope guys. If I have an object which contains a bunch of children and cascade is set on the relationships. When I add the parent object to the session and commit it, are the children saved as part of a

[sqlalchemy] Re: how to print a constructed query with it's parameters?

2008-10-15 Thread alex bodnaru
hi friends, i have a lot to learn from both approaches, but i have sadly appeared too lazy. there will be no problem to imagine what the sql will be, only by looking at the template statement (with ?'s) and at the list of parameters. since the template is available to print (probably by

[sqlalchemy] Re: how to print a constructed query with it's parameters?

2008-10-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of alex bodnaru Sent: 15 October 2008 11:00 To: SQLAlchemy Subject: [sqlalchemy] how to print a constructed query with it's parameters? hello friends, in order to debug my code, i

[sqlalchemy] how to print a constructed query with it's parameters?

2008-10-15 Thread alex bodnaru
hello friends, in order to debug my code, i wish to print my query sql. it's in the fashion of query = table.query().filter(table.code='XL').filter(table.name.like('%'+q+'%') with unicode parameters. by just printing query, i get the select with ? parameters, but not the additional parameters

[sqlalchemy] Re: how to print a constructed query with it's parameters?

2008-10-15 Thread alex bodnaru
hi Ants, thank you very much. it will help me and many others in printf style debugging. best regards, alex On Wed, Oct 15, 2008 at 15:09, Ants Aasma [EMAIL PROTECTED] wrote: This seems to come up often. I took a few minutes and threw together a semi-robust way to do this on 0.5 series. I

[sqlalchemy] Re: how to print a constructed query with it's parameters?

2008-10-15 Thread Ants Aasma
This seems to come up often. I took a few minutes and threw together a semi-robust way to do this on 0.5 series. I posted it under usage recipes in the wiki: http://www.sqlalchemy.org/trac/wiki/DebugInlineParams It has some flaws, but should be somewhat helpful for debugging. Ants On Oct 15,

[sqlalchemy] Re: how to query across all fields in an object?

2008-10-15 Thread Wojciech Malinowski
Jorge Vargas wrote: Hi, I'm trying to implement a simple search field in my application and I was wondering which will be the best way to implement it on SQLAlchemy. I have googled around and found several partial solutions but none of them convince me of being the right way. My use

[sqlalchemy] Re: how to query across all fields in an object?

2008-10-15 Thread az
On Wednesday 15 October 2008 07:04:29 Jorge Vargas wrote: On Tue, Oct 14, 2008 at 11:59 AM, [EMAIL PROTECTED] wrote: this is somewhat frequent question, lookup the group in the past if anyone has something usable. maybe something like query(cls).filter( or_(*[column == value

[sqlalchemy] problem selecting sql aggregate data

2008-10-15 Thread Jonathon Anderson
I keep getting an exception deep within sqlalchemy whenever I try to select a bit of aggregate data using the Session (I'm using SA 0.5.0rc2). For now, assume that my metadata/mappers are sensible, because I can't get over the thought that I'm just doing something simple wrong with the query, but

[sqlalchemy] Re: connect data base

2008-10-15 Thread Kyle Schaffrick
On Wed, 15 Oct 2008 15:44:02 +0100 nesrine nesrine [EMAIL PROTECTED] wrote: I fix an ordianary user with password, but I have the same error. I think that this problem is from file configure pg_hda.conf, but I not find tutorial witch has instruction about change in this file. think very

[sqlalchemy] mysql connections

2008-10-15 Thread andres
hi, i'm having trouble with mysql connections using SQLAlchemy 0.5.0beta3. when there are 15 connections in scope, the call to grab a new connection hangs. here is a sample script which hangs for mysql but not for sqllite: from sqlalchemy import create_engine conn = [] # will pass for sqlite

[sqlalchemy] sqlite in memory db problems . sample code.

2008-10-15 Thread Diarmuid
I found a post saying this is not possible, but some code might be useful for others Any suggestions on using a (any) database on a readonly (compact flash) drive. Is there a pure python database that works in memory. from sqlalchemy import * import threading #The following line works fine db =

[sqlalchemy] Re: problem selecting sql aggregate data

2008-10-15 Thread Michael Bayer
On Oct 15, 2008, at 6:19 PM, Jonathon Anderson wrote: I keep getting an exception deep within sqlalchemy whenever I try to select a bit of aggregate data using the Session (I'm using SA 0.5.0rc2). For now, assume that my metadata/mappers are sensible, because I can't get over the thought

[sqlalchemy] Re: in memory sqlite database with treads - Does it work version 0.4.0

2008-10-15 Thread Michael Bayer
On Oct 15, 2008, at 5:55 PM, Diarmuid wrote: Hi, I have developed an app that uses sqlite as the database. The app creates the database, creates the orm tables, and creates a Session object using sessionmaker. The database is set as a global variable as is the meta data and session

[sqlalchemy] in memory sqlite database with treads - Does it work version 0.4.0

2008-10-15 Thread Diarmuid
Hi, I have developed an app that uses sqlite as the database. The app creates the database, creates the orm tables, and creates a Session object using sessionmaker. The database is set as a global variable as is the meta data and session object. It all works fine at that point. I then create a

[sqlalchemy] Re: in memory sqlite database with treads - Does it work version 0.4.0

2008-10-15 Thread Michael Bayer
On Oct 15, 2008, at 5:55 PM, Diarmuid wrote: Hi, I have developed an app that uses sqlite as the database. The app creates the database, creates the orm tables, and creates a Session object using sessionmaker. The database is set as a global variable as is the meta data and session

[sqlalchemy] Re: in memory sqlite database with treads - Does it work version 0.4.0

2008-10-15 Thread Michael Bayer
On Oct 15, 2008, at 9:27 PM, Michael Bayer wrote: from sqlalchemy.pool import StaticPool create_engine('sqlite://', poolclass=StaticPool) here it is completely: create_engine('sqlite://', poolclass=StaticPool, connect_args={'check_same_thread':False}) also make sure you're on 0.4.7p1

[sqlalchemy] Re: mysql connections

2008-10-15 Thread Michael Bayer
On Oct 15, 2008, at 8:05 PM, andres wrote: hi, i'm having trouble with mysql connections using SQLAlchemy 0.5.0beta3. when there are 15 connections in scope, the call to grab a new connection hangs. here is a sample script which hangs for mysql but not for sqllite: the default maximum

[sqlalchemy] Re: problem selecting sql aggregate data

2008-10-15 Thread Jonathon Anderson
this would imply you're sending a class into a filter() expression or something similar (such as, MyClass.foo==SomeOtherClass). I didn't understand at first, because the query in question Session.query(Project, func.count(Charge)).join(Project.allocations,