django-mysql icon indicating copy to clipboard operation
django-mysql copied to clipboard

Handler API could be nicer

Open adamchainz opened this issue 10 years ago • 0 comments

The HANDLER API as introduced in #9 is good for reading and iterating, but basic primary-key lookups could be made nicer with something like:

handler.get(pk=5)

Also maybe read could use any used kwargs to construct its where, so you could simply:

handler.iter(age__gte=18)

Rather than the awkward pass-in where we have now (which may still be needed for more complex queries though).

adamchainz avatar Mar 26 '15 18:03 adamchainz