Sam schrieb:
One of the things I really liked about sqlobject was its versioning
plug-in. ( http://www.sqlobject.org/Versioning.html )
Is there anything similar for sqlalchemy? A google search turned up
versioned ( http://elixir.ematia.de/apidocs/elixir.ext.versioned.html
)
This is a
Hi,
I've got a table with a unique-constraint. And I've got an automatic
transaction management via decorator in place.
Now it can happen that the violation of that constraint occurs - then a
ProgrammingError is raised. As the violation is non-fatal, I try to
catch it, and continue.
The
The main reason why I wan't to use relations is eagerloading, because
it is the only way, as far as I can see, to retrieve data from DB from
several objects in one request.
I don't wan't each of my 50 objects requests the DB to fill its own
neighbors; but fill them all in one request.
On Friday 12 September 2008 05:37:35 Sam wrote:
One of the things I really liked about sqlobject was its versioning
plug-in. ( http://www.sqlobject.org/Versioning.html )
Is there anything similar for sqlalchemy? A google search turned
up versioned (
On Fri, Sep 12, 2008 at 4:37 AM, Sam [EMAIL PROTECTED] wrote:
One of the things I really liked about sqlobject was its versioning
plug-in. ( http://www.sqlobject.org/Versioning.html )
Is there anything similar for sqlalchemy? A google search turned up
versioned (
I have a view in an FB db with basically does this
CREATE VIEW VCBOOK(
CB_CELLARBOOKID,
CBV_CBVINTAGEID,
CBB_CBBOTTLEID
)
AS
select cb.cellarbookid, cbv.cbvintageid, cbb.cbbottleid,
from cellarbook cb
left outer join cbvintage cbv on cb.cellarbookid = cbv.fk_cellarbookid
left outer
As the session is handled by TurboGears, I tried the following:
from turbogears.database import session
try:
MyDBLog(
myfield='A too long string '
)
session.commit()
session.begin()
except Exception, e:
log.error(Exception occurred with database logging:
Still not there, but another question/problem below:
Werner F. Bruhin wrote:
I have a view in an FB db with basically does this
CREATE VIEW VCBOOK(
CB_CELLARBOOKID,
CBV_CBVINTAGEID,
CBB_CBBOTTLEID
)
AS
select cb.cellarbookid, cbv.cbvintageid, cbb.cbbottleid,
from cellarbook
Werner F. Bruhin wrote:
...
j3 = sao.outerjoin(db.Cellarbook, db.Cbvintage).outerjoin(db.Cbvintage,
db.Cbbottle)
print j3
j1 and j2 produce a join clause, but on j3 I get the following exception:
I different exception if I actually try to use j3:
I do this:
wine =
On Sep 12, 2008, at 3:48 AM, Diez B. Roggisch wrote:
Hi,
I've got a table with a unique-constraint. And I've got an automatic
transaction management via decorator in place.
Now it can happen that the violation of that constraint occurs -
then a
ProgrammingError is raised. As the
On Sep 11, 2008, at 11:01 PM, sakesun wrote:
I need sqlalchemy to work on ironpython (1.2 or 2.0b)
sqlalchemy fail on ironpython even with simple use case
like create simple Table definition.
from sqlalchemy import Table, Column, Integer, String, MetaData,
ForeignKey
metadata =
On Sep 12, 2008, at 9:42 AM, Werner F. Bruhin wrote:
j1 = sao.outerjoin(db.Cellarbook, db.Cbvintage)
print j1
j2 = sao.outerjoin(db.Cbvintage, db.Cbbottle)
print j2
j3 = sao.outerjoin(db.Cellarbook,
db.Cbvintage).outerjoin(db.Cbvintage,
db.Cbbottle)
print j3
j1 and j2 produce a
Michael,
Michael Bayer wrote:
...
if CellarBook, Cbvintage, etc. are mapped classes, the join and
outerjoin functions you must be using are from sqlalchemy.orm import
join, outerjoin. those are aware of ORM mapped classes whereas
sqlalchemy.sql.expression.join/outerjoin are not.
On Sep 12, 2008, at 11:43 AM, Werner F. Bruhin wrote:
Michael,
Michael Bayer wrote:
...
if CellarBook, Cbvintage, etc. are mapped classes, the join and
outerjoin functions you must be using are from sqlalchemy.orm import
join, outerjoin. those are aware of ORM mapped classes whereas
Michael Bayer wrote:
...
Now, if you actually want to get back objects for the outerjoins, youd
say somehting like:
sess.query(SomeClass, SomeOtherClass, SomeThirdClass)
On Firebird when I do this I get a cross join (according to the Helen
Borrie book) which in my case gives me 280
On Sep 12, 2008, at 12:49 PM, Werner F. Bruhin wrote:
Michael Bayer wrote:
...
Now, if you actually want to get back objects for the outerjoins,
youd
say somehting like:
sess.query(SomeClass, SomeOtherClass, SomeThirdClass)
On Firebird when I do this I get a cross join (according to
Michael Bayer wrote:
On Sep 12, 2008, at 12:49 PM, Werner F. Bruhin wrote:
Michael Bayer wrote:
...
Now, if you actually want to get back objects for the outerjoins,
youd
say somehting like:
sess.query(SomeClass, SomeOtherClass, SomeThirdClass)
On Firebird when I do
On Sep 12, 2008, at 1:09 PM, Werner F. Bruhin wrote:
Michael Bayer wrote:
On Sep 12, 2008, at 12:49 PM, Werner F. Bruhin wrote:
Michael Bayer wrote:
...
Now, if you actually want to get back objects for the outerjoins,
youd
say somehting like:
sess.query(SomeClass, SomeOtherClass,
Michael,
Michael Bayer wrote:
...
OK, more specifically, this is how to do the query:
sess.query(SomeClass, SomeOtherClass,
SomeThirdClass).outerjoin((SomeOtherClass,
SomeClass.foo==SomeOtherClass.bar), (SomeThirdClass,
SomeOtherClass.foo==SomeThirdClass.bar))
if firebird can't do
On Fri, 12 Sep 2008 11:11:50 -0400
Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 11, 2008, at 11:01 PM, sakesun wrote:
I need sqlalchemy to work on ironpython (1.2 or 2.0b)
sqlalchemy fail on ironpython even with simple use case
like create simple Table definition.
from
20 matches
Mail list logo