Commit graph

34 commits

Author SHA1 Message Date
Rohit Waghchaure
3ec948239f feat: group by week dates in qb 2025-08-15 15:37:36 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Sagar Sharma
a43ad15eab feat: Truncate QB function 2023-05-26 14:03:47 +05:30
Sagar Sharma
3f0b03c808 feat: Round QB function 2023-05-26 14:03:12 +05:30
Faris Ansari
f982439eb9 fix: pass fields explicitly
- to prevent addition of default `name` field
- also, add fields only if it is a select query
2023-01-09 16:43:44 +05:30
Faris Ansari
be654eaa60
Merge branch 'develop' into refactor-qb-engine 2023-01-09 15:23:20 +05:30
Ankush Menat
075a2d778e feat: UnixTimestamp QB function 2023-01-09 12:05:52 +05:30
Faris Ansari
726fcfdb79 refactor: qb.engine
- simplify
- qb.engine.get_query -> qb.get_query
- qb.engine.build_conditions -> qb.get_query
2022-12-25 23:19:11 +05:30
mergify[bot]
002b27dbdd
fix: pypika does not parse datetime.time (backport #18184) (#18205)
* 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>
2022-09-23 15:46:31 +05:30
Aradhya
85d1e41738 fix: fixed join query from fields 2022-08-10 23:42:01 +05:30
Aradhya
6c905233c5 feat: Added support for string filters in query 2022-07-28 23:55:58 +05:30
Aradhya
1ae3b7f16b feat: Added support for fields in Locate 2022-07-27 21:22:38 +05:30
Aradhya
c97562b736 feat: Added Timestamp support 2022-07-08 21:05:42 +05:30
Aradhya
88faad6409 fix: pyupgrade 2022-07-01 13:30:18 +05:30
Aradhya Tripathi
ebd1d5b48c
Merge branch 'develop' into get-all-mod 2022-07-01 13:25:32 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
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
2022-07-01 11:51:05 +05:30
Ankush Menat
813dcc1848
Revert "feat: Adding support to Query engine" 2022-06-29 23:30:23 +05:30
Aradhya
58645998c0 fix: fixed fields with operators and added abs 2022-06-29 15:03:37 +05:30
Aradhya
7732accded feat: Attached Engine object to qb & added dynamic type hints 2022-06-28 19:43:23 +05:30
Aradhya
960952cfc3 feat(qb-engine): Added Aggregation function support
* Added Min, Max
* Added tests
2022-06-28 19:41:39 +05:30
Aradhya
d0680941ad refactor: frappe.qb.engine
* 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
2022-06-28 19:41:23 +05:30
saxenabhishek
1df3e8f5e7 test: test agg funtions 2022-05-16 15:20:23 +05:30
saxenabhishek
846b89a703 test: test cast funtion 2022-05-16 15:20:23 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
71d3f1c0d1 feat(minor): Add DateFormat function util for qb 2022-03-31 13:39:06 +05:30
Ritwik Puri
0d16c20f93
test: tests for Cast_ Function in qb (#16399)
* test: tests for Cast_ Function in qb

* test: remove unneeded sync

Co-authored-by: Mohammad Hasnain <hasnain2808@gmail.com>
2022-03-25 14:46:08 +05:30
Mohammad Hasnain Mohsin Rajan
fda544f424
refactor!: make automatically following documents optional (#16030)
* 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>
2022-03-25 02:01:15 +05:30
Ankush Menat
1a0fb21645 feat: MySQL TIMESTAMP functionality for QB 2022-03-16 15:13:04 +05:30
Aradhya
b5c73648dc refactor: made DRY-er functions 2021-11-26 15:44:14 +05:30
Aradhya
22434d065c feat: Added aggregation functions to qb functions
refactor: changed args to aggregation funcs to match db level aggregation funcs
2021-11-26 13:19:26 +05:30
Aradhya-Tripathi
4eabb7129e feat: Added concat_ws in frappe.qb 2021-11-08 13:55:17 +05:30
saxenabhishek
42dc8a180f refactor: get_table_name, run_only_if 2021-07-30 11:48:12 +05:30
saxenabhishek
ce10e36725 refactor: move all pypika functions to a module 2021-07-30 11:00:35 +05:30
saxenabhishek
dd36b2a528 refactor: move to get_query_builder 2021-07-30 11:00:35 +05:30
Renamed from frappe/query_builder/custom_functions.py (Browse further)