Commit graph

692 commits

Author SHA1 Message Date
Ankush Menat
024faff025
build: bump pymysql (#20478)
Actual fix for this bandaid fix: https://github.com/frappe/frappe/pull/20475

Keeping pymysql hard pinned until we have better way to get last full
query.
2023-03-28 13:04:27 +05:30
Ankush Menat
da086a4410
feat: allow configuring ttl for RQ job retention (#20331)
Some might want to keep them around for long, others might wanna get rid
of it to free up memory. Hardcoded defaults dont work for everyone hence
make it configurable.

`no-docs`


[skip ci]
2023-03-14 12:43:41 +05:30
Ankush Menat
4ec874ac6e style: format 2023-03-06 11:05:29 +05:30
Saif Ur Rehman
e9dfa80cf0
fix(Database): clear background jobs and realtime logs on rollback (#20236) 2023-03-06 10:47:11 +05:30
Sagar Vora
70ede18942
fix: improved implementation of between filter (#20190) 2023-03-02 09:51:02 +05:30
Ankush Menat
9c28368213
chore: simpler "*" check condition (#20201) 2023-03-01 15:48:02 +05:30
Ankush Menat
d8ae5cd187
Revert "chore(Database): simplify condition" (#20200) 2023-03-01 15:26:24 +05:30
Sagar Vora
ad90ea888a chore(Database): simplify condition 2023-03-01 12:11:10 +05:30
Ankush Menat
9321a2e86a fix(UX): Better message for read only mode
- The default message keeps confusing user because it doesn't contain the word "site update" which is usually the reason for putting site in read only mode.
- Also fixes annoying popup while opening notifications in read only mode.

[skip ci]
2023-02-27 16:16:22 +05:30
Ankush Menat
30f0b4ea2d
perf!: frappe.db.exists without order_by (#20093) 2023-02-20 17:28:03 +05:30
Gavin D'souza
3cd781e316 Merge branch 'develop' into get_all-virtual-dts 2023-02-02 13:55:24 +05:30
Gavin D'souza
5d3453eeb9 refactor: Re-use DefaultOrderBy value as global constant 2023-02-02 13:43:31 +05:30
Ritwik Puri
73078e89ba
Merge pull request #19888 from ankush/drop_tables
fix: drop table if exists for action and links
2023-02-01 22:55:40 +05:30
Ankush Menat
dad0e5cbba fix: drop table if exists for action and links
closes https://github.com/frappe/frappe/issues/19712
2023-02-01 22:37:43 +05:30
Gavin D'souza
7ce0c4c8b3 Merge branch 'develop' into permlevel-apis 2023-01-31 17:47:59 +05:30
Ankush Menat
b8deb72411
fix: prepared report patch (#19807)
- the patch is failing if system setting is updated and column is gone
- the message is misleading "invalid column", it should be "missing field".
2023-01-27 14:26:54 +05:30
Sagar Vora
db9b25ec0e
fix(MariaDBTable): dont attempt to drop index twice (#19783) 2023-01-27 09:27:11 +05:30
Gavin D'souza
6b0e4695a8 Merge branch 'develop' into permlevel-apis 2023-01-25 12:08:47 +05:30
Gavin D'souza
d357af1533 refactor: Add a maxsplit limit to string splits 2023-01-24 19:22:51 +05:30
gavin
4be74bc013
Merge branch 'develop' into permlevel-apis 2023-01-19 11:00:15 +05:30
Ankush Menat
fa55793a52
Merge pull request #19405 from netchampfaris/refactor-qb-engine
refactor: qb.engine
2023-01-18 21:17:17 +05:30
Faris Ansari
ee17b22110 fix: only replace "tab" at the beginning 2023-01-17 14:04:31 +05:30
Faris Ansari
543458b473 fix: handle empty list as filters 2023-01-16 15:38:15 +05:30
gavin
d1b7a69141
Merge branch 'develop' into permlevel-apis 2023-01-16 14:54:36 +05:30
Faris Ansari
52e3d8d58b fix: handle empty string passed to filters 2023-01-16 14:11:37 +05:30
Faris Ansari
a93380ac9c fix: handle empty list for "in" and "not in" 2023-01-13 16:22:25 +05:30
Faris Ansari
5340efd156 fix: don't cast integer value in filter 2023-01-13 16:21:51 +05:30
Pruthvi Patel
2e87b405fe
chore(docstring): fix docstring to match the value of MAX_WRITES_PER_TRANSACTION (#19572) 2023-01-12 17:47:59 +05:30
Faris Ansari
76deeb531c fix: support list of str or int in filters 2023-01-10 18:22:05 +05:30
Faris Ansari
a0f6a5ff46 fix: move pluck to run 2023-01-10 18:21:50 +05:30
gavin
2b27652bd4
Merge branch 'develop' into permlevel-apis 2023-01-10 17:45:46 +05:30
Ankush Menat
894f0affcc
fix(DX): Print alter query if it fails during migration (#19552) 2023-01-10 16:55:29 +05:30
Faris Ansari
95d8a0f919 fix: allow Table instance 2023-01-10 16:48:38 +05:30
Faris Ansari
fe13108eec fix: refactor
- move operator map in separate file
- remove unnecessary code
- organize functions
2023-01-10 16:15:33 +05:30
Faris Ansari
08fc5b5c90 fix: allow list of dict in filters 2023-01-09 19:54:26 +05:30
Faris Ansari
9e9de7053c fix: set default order_by direction to desc 2023-01-09 18:19:31 +05:30
Faris Ansari
6192a9285a fix: use Field objects as is in apply_filter 2023-01-09 17:51:55 +05:30
Gavin D'souza
058c49f439 fix: Pass parenttype in meta calls, handle count(*) type queries 2023-01-09 17:09:36 +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
35c2654f00 chore: indentation fix 2023-01-09 15:34:50 +05:30
Faris Ansari
be654eaa60
Merge branch 'develop' into refactor-qb-engine 2023-01-09 15:23:20 +05:30
Faris Ansari
e4ac91a035 fix: ignore string with parenthesis
if it is not an sql function
2023-01-09 15:20:30 +05:30
Ankush Menat
28375e8e6e
refactor: deprecate db.set_value on singles completely (#19481) 2023-01-05 13:04:08 +05:30
Ankush Menat
3e7a572aa2 refactor: Deprecate db.set_value with None as docname 2023-01-04 11:05:09 +05:30
Faris Ansari
b7c0ba1bea fix: allow dynamic fields in filters
e.g.,
`filters={'link.field': 'value'}`
`filters={'child.field': 'value'}`
2022-12-31 22:55:00 +05:30
Faris Ansari
e272adb0b1 fix: use table.field instead Field('field') 2022-12-31 22:17:39 +05:30
Faris Ansari
847206222f fix: delete option 2022-12-31 22:17:20 +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
Ankush Menat
95039a1265
fix: db ssl connection (#19308)
ref: https://pymysql.readthedocs.io/en/latest/modules/connections.html

[skip ci]
2022-12-19 11:21:15 +05:30
Ankush Menat
8df845ca35 fix: duplicate unique index when column is altered 2022-12-15 13:36:28 +05:30