[sqlalchemy] session of an object

2009-03-25 Thread Alessandro Dentella
Hi, is there a way to get the session an object belongs to? I have been looking around and cannot find any function/way for that... Thanks in advance sandro *:-) -- Sandro Dentella *:-) http://sqlkit.argolinux.orgSQLkit home page - PyGTK/python/sqlalchemy

[sqlalchemy] Re: session of an object

2009-03-25 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24.03.2009 23:01 Uhr, Alessandro Dentella wrote: Hi, is there a way to get the session an object belongs to? I have been looking around and cannot find any function/way for that... object_session(obj) - -aj -BEGIN PGP

[sqlalchemy] deepcopy of sqlalchemy object

2009-03-25 Thread Ash
I have made some sql.expression and add them in dict like {'where':[ sqlalchemy.sql.expression._BinaryExpression object at 0x97680ec]} something like this In the process it goes in some other dict When now i try to do deepcopy i get error File

[sqlalchemy] Re: sqlalchemy and json

2009-03-25 Thread alex
It gets result - first row. But I have an error TypeError: datetime.datetime(2009, 3, 11, 9, 56, 6) is not JSON serializable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group,

[sqlalchemy] Re: 0.5.2 seems to always roll back with mssql

2009-03-25 Thread lurcher
Hi, I don't know if I can add any further to this, but I have just been looking at this exact problem with our (Easysoft) SQL Server driver. And one thing we have found is that you get different results depending on which version of TDS the driver is using. If we use (for the moment) the MS

[sqlalchemy] Re: sqlalchemy and json

2009-03-25 Thread alex
Thanks, it gets results. But I have an error TypeError: datetime.datetime(2009, 3, 11, 9, 56, 6) is not JSON serializable --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send

[sqlalchemy] Re: Declarative with Enthoughts Traits framework.

2009-03-25 Thread Christiaan Putter
Hi, Right now I'm really only using multiple threads for speeding up downloads over the internet (which I need to update the data). Actually commiting the data is still done via the gui's thread session. At some point speeding up the algorithms would be nice, a concurrent solution would be

[sqlalchemy] Re: Declarative with Enthoughts Traits framework.

2009-03-25 Thread az
ah. when u don't have an explicit spec, the testcases are the real spec. so make sure u really cover all them funny cases (-: i had the default_values problem too, and to solve it i have split the attr.access into two layers: one that sits below SA (as a fake dict), and one thin that sits on

[sqlalchemy] Seperate History Tables

2009-03-25 Thread Suha Onay
Hi, I am using sqlalchemy for a while in a project. The project has lots of models like User: -- from mcmodel import MCModel Base = declarative_base() class User(MCModel, Base): __tablename__ = 'users' id =

[sqlalchemy] Re: How does query.get() work?

2009-03-25 Thread Dan F
I understand what get() is supposed to do, but it doesn't clear it up because it still seems like there should be a way of retrieving a *set* of records back from the database at once. I only see a couple choices currently. Either I can use filter() and retrieve every record in the set (even

[sqlalchemy] SQLAlchemy 0.5.3 released

2009-03-25 Thread Michael Bayer
I've been a little busy lately so we're a month off on this one, but there's a trove of bugfixes in this one, largely related to new features that are specific to the 0.5 series, as well as some behavioral enhancements to Query and declarative - read the changelog for details. I'm

[sqlalchemy] Re: 0.5.2 seems to always roll back with mssql

2009-03-25 Thread Rick Morrison
Yep, same here. ..on my mssql 2005, I tried this query batch: set implicit_transactions on go select 'After implicit ON', @@trancount exec sp_datatype_info go select 'After query w/implicit', @@trancount begin transaction go select 'After BEGIN', @@trancount Here's the output: