[sqlalchemy] Re: Is there a way to globally set DateTime string formatting?

2010-09-27 Thread Jason Baker
On Sep 24, 7:09 pm, Michael Bayer mike...@zzzcomputing.com wrote: If you have a stringified date format that you'd like to pass to SQL statements as values, such that the string is parsed into a datetime then passed to the DBAPI, just use TypeDecorator around

[sqlalchemy] Re: Why isn't this Json column type working?

2010-09-19 Thread Jason Baker
On Sep 18, 9:08 pm, Michael Bayer mike...@zzzcomputing.com wrote:  You might after that also throw a pdb into the process_bind_param() method and ensure that its being called Sorry, I should have been more clear about this. If I add a print statement in process_bind_param it doesn't get

[sqlalchemy] Why isn't this Json column type working?

2010-09-18 Thread Jason Baker
So I have a JSON column type that I wrote. As it turns out, it's pretty much the same as the one here[1]: from json import dumps, loads class Json(types.TypeDecorator, types.MutableType): impl=types.Text def process_bind_param(self, value, dialect): return dumps(value) def

[sqlalchemy] Re: Help with optimizing

2010-06-02 Thread Jason Baker
On May 30, 8:39 pm, Michael Bayer mike...@zzzcomputing.com wrote: OK well by re018792aea57 I've bumped the callcounts down a *little*, reducing compiler overhead within the flush().     Perhaps it will be a bigger difference for your app which seems to be heavy on flush() calls. As it turns

Re: [sqlalchemy] Help with optimizing

2010-05-28 Thread Jason Baker
the usage of a session-spanning compilation cache. That would be a *huge* help. Would this involve a custom Query subclass? -- Jason Baker Developer ZeOmega 3010 Gaylord Parkway, Suite 210 Frisco, TX 75034 O: 214-618-9880 ext 8024 jba...@zeomega.com www.ZeOmega.com Proven. Progressive. Partner

Re: [sqlalchemy] Sql alchemy-Oracle Error

2010-05-05 Thread Jason Baker
On Wed, May 5, 2010 at 7:42 AM, dhanil anupurath dhanilanupur...@gmail.comwrote: Hi I am using sqlalchemy in my TurboGears application. some of my classes has columns with Pickletype dataType. these get converted to BLOB dataType in the database. I was using mySql till recently and

[sqlalchemy] Mapper table properties

2010-04-23 Thread Jason Baker
Given an entity class (or entity instance), I'd like to get the table that is mapped to it. If I get the mapper using object_mapper/class_mapper, then I get a mapper with the following properties defined (among others): local_table, mapped_table, and tables. Can someone help me understand what

Re: [sqlalchemy] Can I log queries from where they're created?

2010-04-06 Thread Jason Baker
not thinking of? -- Jason Baker Developer ZeOmega 3010 Gaylord Parkway, Suite 210 Frisco, TX 75034 O: 214-618-9880 ext 8024 jba...@zeomega.com www.ZeOmega.com Proven. Progressive. Partner. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] envbuilder setup for sqlalchemy

2010-04-06 Thread Jason Baker
Hello, Just in case anyone can use this, I've created a sample envbuilder file that will create a virtualenv with sqlalchemy installed from hg. The file is here: http://github.com/jasonbaker/envbuilder/blob/master/examples/sqlalchemy/.env To use it: 1. Install the development version of

[sqlalchemy] Can I log queries from where they're created?

2010-04-05 Thread Jason Baker
Here's what I'd like to do. Suppose I have some class Foo in some_module.py: class Foo(Entity): def all_foos(self): return self.session.query(Foo).all() ...sqlalchemy by default will log this to sqlalchemy.engine. However, this makes it a bit difficult to narrow down