pyxero icon indicating copy to clipboard operation
pyxero copied to clipboard

Adding support for case-insensitive queries

Open justmobilize opened this issue 6 years ago • 2 comments

Xero queries support the ToLower() function. Example: Name.tolower().startswith("office")

I think something like: xero.contacts.filter(Name__tolower__startswith=query)

I'm happy to put together a PR for this if you agree

justmobilize avatar Mar 19 '18 20:03 justmobilize

There's an existing workaround for case insensitive queries if you're interested:

As per issue https://github.com/freakboy3742/pyxero/issues/71

filter(raw='Contact.Name.ToLower().Contains("abc")')

MattHealy avatar Mar 19 '18 23:03 MattHealy

Thanks! I'll definitely start with that.

Would you rather keep the work around or build it into the normal query?

justmobilize avatar Mar 20 '18 14:03 justmobilize