Commit graph

850 commits

Author SHA1 Message Date
Ankush Menat
6de41a78e9 refactor: guard clause 2022-10-06 11:11:03 +05:30
Aradhya Tripathi
c15da987eb
Merge branch 'develop' into qb-fixes 2022-09-21 02:24:23 +05:30
Aradhya
ee3651b103 refactor: separated nested set logic 2022-09-20 01:54:41 +05:30
Aradhya
38f1a9708a refactor: simplified logic 2022-09-20 01:45:20 +05:30
Ankush Menat
82cd238f54
perf!: Only add modified index on parent doctypes (#18119)
When are child tables sorted by timestamp by default?
2022-09-15 19:16:12 +05:30
Ankush Menat
5152f13b10 fix: RQ reduce failed job TTL from 1 year to 7 days 2022-09-10 23:54:43 +05:30
Ankush Menat
ea7fbb2c10 refactor: remove dead flag db.read_only
This was added in last DB refactor but it does nothing, it was probably
supposed to do something with the connection pool but to best of my
knowledge "read only" is not a property of a connection.

It can be achieved with users who only have read access, that however
isn't implemented anywhere.

Removing this for now.
2022-09-09 17:34:46 +05:30
Ankush Menat
f96505fae0 feat: wrap read only mode SQL errors 2022-09-09 17:34:44 +05:30
Ankush Menat
4389447148 fix: always explicitly start a new transaction
Active read only transaction can be aborted by doing a commit and then
issuing queries. This prevents such edge cases.
2022-09-08 18:22:08 +05:30
Ankush Menat
5e86e1f192 feat: db.begin(read_only=True)
You can now start read only transaction by passing read only flag. Read
only transactions prevent any query that is of "WRITE" type like
insert/delete/update.
2022-09-08 18:22:03 +05:30
Aradhya
520c8503a8 refactor: using cached property 2022-09-05 16:04:38 +05:30
Aradhya
ae18f74311 feat: Added nested set support 2022-09-03 19:15:35 +05:30
Aradhya
3cb98121a8 refactor: more PseudoColumn checks :( 2022-09-02 00:16:08 +05:30
Aradhya
6262119eec refactor: removed dead code 2022-09-01 20:04:04 +05:30
Aradhya
0c09dd4863 fix: not joining twice implicitly 2022-09-01 20:03:43 +05:30
Aradhya
e576d16855 refactor: using refactored TABLE_PATTERN for finding fields 2022-08-31 15:44:43 +05:30
Aradhya
c55afe23f8 refactor: removed flaky implicit joins 2022-08-30 16:40:47 +05:30
Aradhya
ec100d7a8a fix: misc fixes 2022-08-30 16:36:00 +05:30
Aradhya
edfa63a4cf fix: lint 2022-08-28 00:08:13 +05:30
Aradhya
f36eda1e83 refactor: using enumerate while indexing on the fly 2022-08-24 14:44:18 +05:30
Aradhya
8fe5a64140 fix: fixed complex toupper implementation 2022-08-24 14:39:43 +05:30
Aradhya
712416ceb0 refactor: changed function name to better define usage 2022-08-22 14:52:41 +05:30
Aradhya
535b64931e refactor: using enumerate to iterate over fields & warn when passing query object to def sql 2022-08-22 14:49:30 +05:30
Aradhya
0d4020e3ed refactor: removed excess branching 2022-08-20 19:27:14 +05:30
Aradhya
0b50e6371b refactor(minor): lint 2022-08-19 16:01:38 +05:30
Aradhya
66ac93e14d Merge branch 'get-all-mod' of github.com:Aradhya-Tripathi/frappe into get-all-mod 2022-08-19 15:57:13 +05:30
Aradhya
e400df90ff refactor: removed iterable from iteration ;/ 2022-08-19 15:56:34 +05:30
Aradhya Tripathi
e73ae6f039
Merge branch 'develop' into get-all-mod 2022-08-19 15:42:35 +05:30
Ankush Menat
f002016eb6
chore: limit over-logging of handled exception (#17878)
[skip ci]
2022-08-19 12:53:51 +05:30
Aradhya
0addffafb9 refactor: minor changes 2022-08-17 19:52:51 +05:30
Aradhya
40bfad9aeb refactor: moved join operations to function 2022-08-14 15:24:06 +05:30
Aradhya
9bb39131c0 refactor: changed get_value_for_many_names to get tuple values 2022-08-14 14:34:02 +05:30
Aradhya
ba2caf206b feat: Added parameterization on queries going through database.py 2022-08-14 12:52:00 +05:30
Aradhya Tripathi
0656ea9b07
Merge branch 'develop' into get-all-mod 2022-08-14 11:39:30 +05:30
Himanshu
3faaf5f361
Merge branch 'develop' into merge_translated_doctypes 2022-08-12 13:10:49 +01:00
Gavin D'souza
91a47c2602 fix: Deprecate setup help database APIs
APIs have been unused since ~v4/6? Don't see any need to keep them in.
2022-08-12 12:52:19 +05:30
Aradhya
caab7ff863 fix: fixed foreign doctype parsing in get_query
lint: removed redundant imports
2022-08-11 18:33:36 +05:30
Aradhya
306e259847 fix: fixed join logic 2022-08-11 00:13:07 +05:30
Aradhya
85d1e41738 fix: fixed join query from fields 2022-08-10 23:42:01 +05:30
Himanshu
e68aac866f
Merge branch 'develop' into merge_translated_doctypes 2022-08-10 18:49:04 +01:00
Gavin D'souza
73994e3b46 refactor(minor): PY310+ API Usages 2022-08-10 19:34:52 +05:30
Gavin D'souza
22f79d735b fix: raise ImplicitCommitError instead of bare exception 2022-08-10 18:45:17 +05:30
Gavin D'souza
b13298d69c fix(db): Log mogrified queries
Prior to this, queries passed to `frappe.db.sql` with values looked like:

"SELECT `defkey`,`defvalue` FROM `tabDefaultValue` WHERE `parent`=%(param1)s ORDER BY `creation`"

Now, they'll look "normal" or built like:

"SELECT `defkey`,`defvalue` FROM `tabDefaultValue` WHERE `parent`='__global' ORDER BY `creation`"
2022-08-10 18:31:44 +05:30
Aradhya
f4eaa4a481 feat: joining on tables mentioned in fields 2022-08-10 01:24:26 +05:30
hrwx
b01929405d refactor: translatable doctypes 2022-08-05 21:38:10 +01:00
Aradhya
2ed0e1e648 fix: fixed filters when getting field names from child tables 2022-08-05 14:51:44 +05:30
Aradhya
4df8b18503 fix: fixed fields when getting field names from child tables 2022-08-04 18:58:03 +05:30
Aradhya
5792265f77 feat: Added support for fieldnames from child tables 2022-08-03 16:31:04 +05:30
Aradhya Tripathi
5ccaebca34
Merge branch 'develop' into get-all-mod 2022-07-29 14:27:37 +05:30
Shariq Ansari
a772cc0796
fix: removing unused import line (#17654) 2022-07-29 10:24:49 +05:30