refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
* Small fixes in set_fields and clean code
* Optimize casefolds
* Fixed functions passed in List
* get_sql => get_query - more expressive, less confusion
* Updated tests
* feat: supporting empty iterables for Contains objects
* fix: explicitly setting empty iterables as tuples to support more operators
* feat: Added locate to frappe.qb Functions
* feat: Added support for functions passed as strings in fields
* feat: Included Criterion objects as fields
* fix: picking up only function intended fields to pass to get_function_objects
* feat: Added iterable for available functions, added support for Field objects
* fix: fixed * passed in fields in lists
* feat: Added support for True as filter and pluck in the query engine
* feat: Added join support
* fix: return if filters are None
* feat: Added support for sets as filters and additional conditions
* fix: fixed IS operator in query builder
* feat: Added support for 'as' in query engine
* fix: fixed 'as' for criterion objects passed directly
* fix: fixed frappe.db.count
* fix: fixed functions in fieldname
* feat: Added support for multiple fields passed as a single string :) fixed None fields in a list
* feat: Added support for "as" in single string fields
* fix: fixed queries with invalid syntax
Converted all possible usages of re.* that weren't compiling the regex
separately and re-using it. Separated out the compiled patterns as
global variables. Repetitive patterns could be made DRY-er.
Would be nicer to have all regexes in a single module so that we could
re-use better, keep track of outdated, and keep checks for possible
reDos' etc
* Added provision for semi-implemneted version
* Hard to fix it completely given it's broken on develop / desk
* Added TODO for adding nestedset related filters