Commit graph

683 commits

Author SHA1 Message Date
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
Ankush Menat
d27ea5e6da test: unique index on install and alter
There should always be 1 unique index.
2022-12-15 13:36:28 +05:30
Sagar Vora
4ea39d1a68
chore!: drop device support from session (#18729)
* chore!: drop device support from session

* chore: remove `session_expiry_mobile` field

* fix: remove extra `%s`
2022-12-05 16:37:32 +05:30
Ankush Menat
186b88a8cb
build: Bump minimum required MariaDB version (#19116) 2022-12-05 16:24:35 +05:30
Ankush Menat
9c104a8e5e fix: Warn about incompatible mariadb versions 2022-12-03 12:20:35 +05:30
Ankush Menat
11cdd21b88 fix: drop mariadb 10.2 checks 2022-12-03 12:20:35 +05:30
Ankush Menat
a6af1ed542 feat: bulk insert simple Document objects 2022-11-28 15:32:20 +05:30
Ankush Menat
7ec120d2ba refactor: support generators in db.bulk_insert
When you want to insert a huge amount of docs in DB, using bulk insert
currently requries creating a huge number of objects, this is
ineffecient from memory perspective and also delays failures if any till
last step in execution.
2022-11-28 15:29:59 +05:30
Ankush Menat
263055e247
fix: site creation using non-root users (#19014) 2022-11-26 12:45:57 +05:30
gavin
440825a372
refactor: which > find_executable (#18872)
Use shutil from the standard library instead of distutils to find
executables in PATH
2022-11-14 18:15:38 +05:30