python-quickbooks icon indicating copy to clipboard operation
python-quickbooks copied to clipboard

Request for filter method to accept > and < operators.

Open Sticky-Bits opened this issue 3 years ago • 0 comments

Hey, quick feature request.

I'd be awesome if the object.filter method could accept a double underscored __gt or __lt suffix on parameters to allow use of > and < without resorting to the query method. Basic queries of "Get me all invoices updated after x date" basically require writing your own sql at the moment.

Suggested that this method should split kwargs on double underscore and check for the presence of gt or lt and construct the appropriate sql.

Here's an example of how pyxero does it: boop

Happy to submit a PR for this when I get some time, but also curious how important the six logic is for python2, since this library is stated to be "A Python 3 library".

Cheers.

Sticky-Bits avatar Aug 11 '21 22:08 Sticky-Bits