Re: [sqlalchemy] Detached instances and lazy-loaded attributes

2013-01-24 Thread Michael Bayer
On Jan 24, 2013, at 1:54 PM, YKdvd wrote: If I have an instance MyInstance with an attribute itsLazyAttribute from a relationship, where everything is defined and queried with lazy loading, then the attribute is lazily loaded, and only filled in when I access it (perhaps,

[sqlalchemy] MySQL drivers

2013-01-24 Thread YKdvd
My main use of SQLAlchemy is in the Python incorporated into Autodesk's Maya graphics program, using the standard MySQL-Python driver. Unfortunately for the most recent Maya 2013 version Autodesk has compiled their Python (2.6.4) with Visual Studio 2010 for Windows, instead of the VS2008 used

[sqlalchemy] Re: Detached instances and lazy-loaded attributes

2013-01-24 Thread YKdvd
I was going to look at some sort of walk and trigger but SQLA is elegant enough that I suspected I was either missing a function that already did this, or was fighting against the design philosophy. Sounds like the latter... :) My background gives detached a less ephemeral flavour, especially

[sqlalchemy] Re: Introducing SQLAlchemy-ORM-tree: a generic API for hierarchical data

2013-01-24 Thread Pirate Fibonacci
Mark, I'm trying to test run your above example with SQLAlchemy-ORM-tree-0.1.2 and SQLAlchemy-0.8.0b2 i get the following traceback, any suggestions, thanks Traceback (most recent call last): File ./t.py, line 28, in module Node.tree.register() File

[sqlalchemy] Subqueries as a column

2013-01-24 Thread Dave Pedu
Hi all, I am trying to run a query like this one, using sqlalchemy: SELECT t.`ForumID`, ( SELECT `ID` FROM `posts` p WHERE `ThreadID` = t.`ID` ORDER BY p.`Date` DESC LIMIT 1 ) as `LastPost` FROM `threads` t WHERE t.`Deleted` = 0 I am unsure how to achieve the subquery that comes out as

Re: [sqlalchemy] Subqueries as a column

2013-01-24 Thread Michael Bayer
On Jan 24, 2013, at 11:03 PM, Dave Pedu wrote: Hi all, I am trying to run a query like this one, using sqlalchemy: SELECT t.`ForumID`, ( SELECT `ID` FROM `posts` p WHERE `ThreadID` = t.`ID` ORDER BY p.`Date` DESC LIMIT 1 ) as `LastPost` FROM `threads` t WHERE

[sqlalchemy] Custom Dialect - recommendations needed for handling of Sequences/lastrowid

2013-01-24 Thread jank
Hello, I have implemented a dialect for a new database (EXASol). I have not done tests using the ORM layer of SA so far as I am primarily interested in the Core layer. So far things worked out pretty well DDL and DML support are basically running. The EXASol DB does not offer Sequences but