The custom implementations were calling .get_sql() on pypika terms,
then passing the already-quoted string to super().__init__() which
quoted it again. This broke queries with quotes in values.
Fix: Let pypika's base classes handle the quoting by passing terms
through unchanged. Ifnull now just aliases pypika's IfNull directly.
* fix: pypika does not parse datetime.time
(cherry picked from commit b8f5a4304cccda954822cfe69d4805a18d9f07a7)
* fix: style - imports sort order fixed
(cherry picked from commit c3562c643ab9bff38d230202675d8ce1ae190912)
* test: add test for query builder parsing datetime.time
(cherry picked from commit 99889c270199da4b26b0d3858ae0f0a416d49d90)
* fix: format_time instead of format_datetime, test was failing!
(cherry picked from commit 5d697a22ac8cb98c8f8f44b3f99c57b932c5223c)
* fix(style): linter issues
(cherry picked from commit e231e1b0eadf63e84c9f81cfed9e2926e086fc44)
* test: add test for postgres
(cherry picked from commit 695591c43af9672cb83ce856a46c97e0bddfa9c3)
* fix: converting datepart and timepart to strings for Combinedatetime
(cherry picked from commit 1ebda943a607688bfb3db9fb42c80723a9050973)
* fix: style, linter issues
(cherry picked from commit c01262ad02b8831fdb0c5332b6973499e8adf6ad)
Co-authored-by: Anoop Kurungadam <anoop@earthianslive.com>
Co-authored-by: Aradhya <aradhyatripathi51@gmail.com>
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
* 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
* fix: make automatically following documents optional
* fix: optimize email triggers for document followed
* test: add tests for document follow settings
* test: sync global search before testing
* fix: extend pypika's cast function to mimic varchar cast in MariaDB
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: phot0n <ritwikpuri5678@gmail.com>