Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 09:21:15PM +0200, Markus Gritsch wrote: > p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. > print Person.select(LIKE(Person.q.name, u'\u20ac'))[0].name.encode('utf-8') Thank you. Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROT

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Markus Gritsch
On 4/18/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, Apr 18, 2007 at 08:57:09PM +0200, Markus Gritsch wrote: > > +if self.need_unicode and not isinstance(query, unicode): > >Can you add a test for this? Some test that produces unicode query... from sqlobject import

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 08:57:09PM +0200, Markus Gritsch wrote: > +if self.need_unicode and not isinstance(query, unicode): Can you add a test for this? Some test that produces unicode query... Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTEC

[SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Markus Gritsch
Hi, I am using the patch below in my local version of SQLObject for several month now. I think I already proposed it some time ago. It allows me to use an application I wrote using the SQLite backend unmodified also with the MySQL backend. The SQLite backend of SQLObject has no problem with han

Re: [SQLObject] Anyone using RowCreatedSignal? (and RowDestroySignal?)

2007-04-18 Thread Luke Opperman
Alright, after professing my preference for post-Signal over post_funcs in the previously mentioned cases, I have to admit that for RowDestroySignal I need post_funcs behavior. For consistency then I'll propose the following changes: RowCreate, RowUpdate, and RowDestroy signals should all take a p

Re: [SQLObject] Anyone using RowCreatedSignal?

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 03:41:59PM +, Luke Opperman wrote: > Not RowCreateSignal (called before insert, allowing modification of kwargs) > but > RowCreatedSignal (called after insert). > > It is currently defined as (kwargs, post_funcs), but never calls post_funcs > and > would make a lot mo

[SQLObject] Anyone using RowCreatedSignal?

2007-04-18 Thread Luke Opperman
Not RowCreateSignal (called before insert, allowing modification of kwargs) but RowCreatedSignal (called after insert). It is currently defined as (kwargs, post_funcs), but never calls post_funcs and would make a lot more sense to send the newly created instance. The docs suggest there may also be

Re: [SQLObject] Thoughts on "Support for MySQL storage ENGINEs"

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 03:59:56PM +0200, Markus Gritsch wrote: > So I would suggest not to add this feature in the final release. I > see no real benefit and like the Zen of Python says "Special cases > aren't special enough to break the rules." ;) Yes, you are right, as usual. :) Oleg. --

[SQLObject] Thoughts on "Support for MySQL storage ENGINEs"

2007-04-18 Thread Markus Gritsch
Hi Oleg, SQLObject 0.9.0b1 got under "Small Features" * Support for MySQL storage ENGINEs. I wonder if the special treatment for MySQL in dbconnection.py and main.py in order to implement this feature is worth it. The same result can already be obtained by using something like this: class Versi

Re: [SQLObject] leftjoin with 3 tables

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 08:42:35AM -0400, Fred C wrote: > But I have an intermediate table. This table has been created > automatically by SQLObject. I just want to be able to use this table > in my request. Alas, you have to recreate it if you want to use it in queries. It lacks an id colu

Re: [SQLObject] leftjoin with 3 tables

2007-04-18 Thread Fred C
On Apr 18, 2007, at 3:48 AM, Oleg Broytmann wrote: > On Tue, Apr 17, 2007 at 07:52:02PM -0400, Fred C wrote: >> The problem is, I don't have a class for the table item_tag and I >> don't know how to address it. > > http://sqlobject.org/FAQ.html#how-can-i-define-my-own-intermediate- > table-in-my

Re: [SQLObject] leftjoin with 3 tables

2007-04-18 Thread Oleg Broytmann
On Tue, Apr 17, 2007 at 07:52:02PM -0400, Fred C wrote: > The problem is, I don't have a class for the table item_tag and I > don't know how to address it. http://sqlobject.org/FAQ.html#how-can-i-define-my-own-intermediate-table-in-my-many-to-many-relationship Oleg. -- Oleg Broytmann