I've started a new fork where you'll begin to see the changes. But
first, a new question.
Since Query is passed the argument 'conditions={}' as a default, you
get a potentially confusing behavior:
firstquery = Query(model=MyModel).filter(name="John")
otherquery = Query(model=MyOtherModel).filter(othername="OtherJohn")
firstquery.conditions is now:
{"name": "John", "othername": "OtherJohn"}
This can be fixed by changing the default to conditions=None and the
necessary logic in __init__, but I would suggest having __init__ set
conditions={} explicitly and forcing the user to use filter() to set
conditions. Simpler code and a single way of doing things--creating
a dictionary and passing it to the class initialization seems just as
cumbersome as a 'Query().filter()' call. Also the user can always set
'qry.condition = mydictionary' if they hate the filter method. What do
you think?
p.s. I posted a simple example and discussion of this behaviour at:
http://bgresearch-bondgeek.blogspot.com/2009/05/6.html
On May 1, 2:10 pm, "Bart Mosley,
bondgeek.com" <
ba...@bondgeek.com>
wrote: