Re: [SQLObject] Generic "find" & findOne method
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <pk...@gm...> - 2004-12-22 13:19:54
|
Oleg Broytmann wrote: >On Tue, Dec 21, 2004 at 02:43:38PM -0200, Carlos Ribeiro wrote: > > >>person.find({'name':'...', 'address':'...'}) >> >> > > What is the difference between >person.find({'name':'...', 'address':'...'}) > and >person.select(AND(person.q.name == '...', person.q.address == '...')) > ?? > > I really like the interface of the first version. IMO it's much more "pythonic" and you can easily write generic (i.e not bound to colum names) queries without hardcoding any column names in the body of the method. ATM I can't think of a way to do this using the select(AND(... approach -- besides, it looks very sqlish... just a thought Paul |