Re: [sqlalchemy] Facing problem with aliasing while using union_all

2011-04-28 Thread monster jacker
On Wed, Apr 27, 2011 at 8:42 PM, Michael Bayer wrote: > > On Apr 27, 2011, at 10:58 AM, monster jacker wrote: > > > >>The Query should return to you tuples that have names like "row_num" > and "test_msg", which are linked to the "anon" names that >>it generates: > > > > >>for row in myquery: >

Re: [sqlalchemy] Re: sqlite transaction isolation, select for update, race condition

2011-04-28 Thread Torsten Landschoff
Hi Clay, On Wed, 2011-04-27 at 11:21 -0700, Clay Gerrard wrote: > ... and all connections would automatically issue the correct begin > statement and acquire a reserved lock at the beginning of the > transaction. But as it is, they don't do anything until they get down > to the update, and it's

Re: [sqlalchemy] Relationship wrt. inheritance problem (and suggested patch)

2011-04-28 Thread Torsten Landschoff
On Thu, 2011-04-28 at 11:36 -0400, Michael Bayer wrote: > funny, that's absolutely a bug and it works in declarative because the > same fix you have there was already applied some time ago within > declarative. this is #2153 targeted at 0.6.8 so I will get to it > when i make a pass through a set

Re: [sqlalchemy] datetime is causing error when accesing MSSQL via sqlalchemy - pyodbc/TDS

2011-04-28 Thread Thang Nguyen
thanks Michael. It turns out that pyodbc was compiled with different version of unixODBC, so there was a mismatch in the libraries used. After recompiling pyodbc against the intented version of unixODBC, things seem to work fine. TPN On Wed, Apr 27, 2011 at 5:51 PM, Michael Bayer wrote: > that

[sqlalchemy] Re: Oracle reserved words

2011-04-28 Thread Sirko Schroeder
On Apr 29, 12:30 am, Michael Bayer wrote: > The next issue is, this was a known issue that is fixed in both 0.6.7 and 0.7 > (ticket 2100, unfortunately I had to go through creating a whole test just > now to figure that out, but there you go).     And, if you name your column   > "group" or "

Re: [sqlalchemy] Can python objects be used in join logic?

2011-04-28 Thread Jennifer Rodriguez-Mueller
Thank you Michael, that makes things *much* clearer! I had been thinking of sqlalchemy as a database manipulation system that took inspiration from my source code, rather than thinking of a library that uses compiled but introspectively accessible bytecode with variable names preserved, so that py

Re: [sqlalchemy] Can python objects be used in join logic?

2011-04-28 Thread Michael Bayer
On Apr 28, 2011, at 2:24 PM, Jennifer Rodriguez-Mueller wrote: > > Here is the core SQL (lots of distracting content trimmed): > > SELECT s.*, a.* > FROM aliquot_table a > JOIN ( -- Biologically (p)lausible aliquot/specimen type logic > SELECT 3 AS a_type, 12 AS s_type UNION -- Se

[sqlalchemy] setting up a many-to-many relation using Declarative with association objects

2011-04-28 Thread Ricardo Silva
Hi list I am starting out with sqlalchemy and I am currently struggling with the following problem. In my model I want to establish a many-to-many relation between an association object and another 'normal sqlalchemy' object. This relationship must also follow the association object pattern. In my

[sqlalchemy] Can python objects be used in join logic?

2011-04-28 Thread Jennifer Rodriguez-Mueller
Hi all, I'm new to sqlalchemy. I've always tended to write SQL directly (exposing SQL results to python code using simple db interface libraries) and I'm still trying to wrap my head around the purpose, style, and proper idioms of ORM technology. This is mostly a cultural question I guess. Hop

Re: [sqlalchemy] Relationship wrt. inheritance problem (and suggested patch)

2011-04-28 Thread Michael Bayer
funny, that's absolutely a bug and it works in declarative because the same fix you have there was already applied some time ago within declarative. this is #2153 targeted at 0.6.8 so I will get to it when i make a pass through a set of small 0.6.8 issues later in the week. On Apr 28, 2011,

Re: [sqlalchemy] Oracle reserved words

2011-04-28 Thread Michael Bayer
On Apr 28, 2011, at 12:45 AM, Sirko Schroeder wrote: > I have a problem with oracle column names that are oracle reserved > words (http://download.oracle.com/docs/cd/B19306_01/em.102/b40103/ > app_oracle_reserved_words.htm). I read through the archive and found: > https://groups.google.com/group/

Re: [sqlalchemy] Strings larger than 16K are truncated? Even for a TEXT column?

2011-04-28 Thread Michael Bayer
likely a FreeTDS configuration issue, I'd check on that end (in particular "text size"). Certainly nothing within SQLAlchemy. On Apr 28, 2011, at 5:13 AM, Joel Zhou wrote: > Hi > > I am using sqlalchemy 0.6.6 with sybase dialect, I found that strings > larger than 16K are truncated to 16K ev

[sqlalchemy] Relationship wrt. inheritance problem (and suggested patch)

2011-04-28 Thread Torsten Landschoff
Hello world! I am currently trying to transform my code from classic (schema defined in an extra python module) to declarative. As intermediate step I am moving the table definitions to the class implementations. What I am running into is sketched in the following example. In reality, I have diff

[sqlalchemy] Strings larger than 16K are truncated? Even for a TEXT column?

2011-04-28 Thread Joel Zhou
Hi I am using sqlalchemy 0.6.6 with sybase dialect, I found that strings larger than 16K are truncated to 16K even for TEXT column. Debug trace shows that string contents are correct in SQL statement but after execution (session.commit()) they are truncated to 16KB. It is a known issue or I mis-c