[sqlalchemy] sqlamp - an implementation of Materialized Path for SQLAlchemy

2009-05-23 Thread General
I hope it will be interesting for somebody: http://sqlamp.angri.ru/ License: BSD. --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Can't determine join between 'engines' and 'versions'. Please specify the 'onclause' of this join explicitly ?

2009-05-23 Thread sniipe
I wrote in my first post, that I am expecting result in SQL - close to this one select e.id, e.type_id, tv.version as min_version, tv2.version as max_version from engines e join versions tv on(e.min_version_id=tv.id) join versions tv2 on(e.max_version_id=tv2.id) where '7.0.1.32' between

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-23 Thread Adrian von Bidder
On Friday 22 May 2009 23.00:05 Werner F. Bruhin wrote: What do you want to do with the autoincrement column? Often these are used for primary keys, which in turn get used as foreign keys. I want to use the id as filename; the table will cache some info that comes from the file. Using it as a

[sqlalchemy] Self Reference within Joined Inheritance

2009-05-23 Thread sven-eric
Dear Group, I have a problem with setting up self referential relations within a joined table inheritance scheme and declarative mapping. Let's say I have a base class B with a derived class S. S has a self-referential many-to-one relationship to B (and with that also to all of B's derived

[sqlalchemy] session.autocommit, session.begin double SessionExtension call

2009-05-23 Thread Alessandro Dentella
Hi, when from my pygtk application i commit, I really do:: if self.session.autocommit: self.session.begin() self.session.commit() I'm normally using session.autocommit = True as a mean to prevent all those 'idle in transaction' processes (that

[sqlalchemy] Possible bug in orm/state.py

2009-05-23 Thread Bob Farrell
Hi, using scoped_session(sessionmaker()) to create my sessions, if I hammer a request (using Pylons) by repeatedly clicking on a link that uses the ORM somewhat extensively for the relevant request, it seems that another thread is getting involved with SQLAlchemy internals and pulling the rug out

[sqlalchemy] Re: Can't determine join between 'engines' and 'versions'. Please specify the 'onclause' of this join explicitly ?

2009-05-23 Thread Michael Bayer
On May 23, 2009, at 5:58 AM, sniipe wrote: I wrote in my first post, that I am expecting result in SQL - close to this one select e.id, e.type_id, tv.version as min_version, tv2.version as max_version from engines e join versions tv on(e.min_version_id=tv.id) join versions tv2

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-23 Thread Michael Bayer
if its of any value, databases like MySQL and SQLIte do not give you any way to get at an auto-generated ID without actually INSERTing a row. Only databases that support sequences, i.e. postgres, firebird, and oracle, give you a built in way to get IDs without using INSERT. On May 23,

[sqlalchemy] Re: Self Reference within Joined Inheritance

2009-05-23 Thread Michael Bayer
use inherit_condition: import sqlalchemy from sqlalchemy import create_engine from sqlalchemy import String, Column, Integer, ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.ext.declarative import declarative_base engine =

[sqlalchemy] Re: session.autocommit, session.begin double SessionExtension call

2009-05-23 Thread Michael Bayer
On May 23, 2009, at 10:15 AM, Alessandro Dentella wrote: Hi, when from my pygtk application i commit, I really do:: if self.session.autocommit: self.session.begin() self.session.commit() I'm normally using session.autocommit = True as a mean to

[sqlalchemy] Re: Possible bug in orm/state.py

2009-05-23 Thread Michael Bayer
On May 23, 2009, at 1:47 PM, Bob Farrell wrote: Hi, using scoped_session(sessionmaker()) to create my sessions, if I hammer a request (using Pylons) by repeatedly clicking on a link that uses the ORM somewhat extensively for the relevant request, it seems that another thread is getting