Commit graph

53 commits

Author SHA1 Message Date
Suraj Shetty
e6ef907184 fix(virtual doctype): Avoid circular calls 2021-04-04 10:13:18 +05:30
Suraj Shetty
65b55f6a90 fix: Check if doctype is virtual doctype before getting value 2021-04-02 16:24:29 +05:30
Shridhar
056b8c0fc6 feat: added get value for virtual doctype 2021-04-01 10:04:11 +05:30
Aditya Hase
b0456503f2
perf: Remove frappe.utils.background_job from import tree 2021-02-21 09:42:04 +05:30
Rushabh Mehta
c873c36971 feat(minor): add before_commit methods 2020-12-17 18:46:06 +05:30
Rushabh Mehta
8707ed1f27 fix(minor): remove "Custom Link" and add patch 2020-10-26 10:02:04 +05:30
Rushabh Mehta
7f9284f3ef fix(tests): postgres gotcha, errors will rollback? 2020-10-26 10:02:04 +05:30
Rushabh Mehta
a0a3606a7f fix(tests): add test cases for custom_link and custom_action 2020-10-26 10:02:04 +05:30
Rushabh Mehta
0192bcf45f fix(minor): frappe.db.set_value to allow multiple values 2020-08-17 22:19:44 +05:30
Rushabh Mehta
56853a0533 fix(linting): sider 2020-08-17 11:10:48 +05:30
Rushabh Mehta
b71acfd5fa fix(minor): print query and values directly if mogrify fails 2020-08-17 10:45:58 +05:30
Rushabh Mehta
b09beb9147 fix(tests): cleanup 2020-08-17 09:41:54 +05:30
Rushabh Mehta
aad2375cf3 fix(major): make document events more efficient, fix bug in cache_manager.get_doctype_map 2020-08-17 09:41:54 +05:30
Rushabh Mehta
26a9230fdd fix(tests): more debugging 2020-08-17 09:41:54 +05:30
Rushabh Mehta
e262ef6add fix(minor): logging fix in document.py 2020-08-17 09:41:54 +05:30
Rushabh Mehta
ef1d1b0dc4 fix(minor): typo 2020-08-17 09:41:54 +05:30
Rushabh Mehta
c83a9a142b fix(minor): mogrify 2020-08-17 09:41:54 +05:30
Rushabh Mehta
eba6dfa12a fix(major): frappe.db.set_value will lock the row 2020-08-17 09:41:54 +05:30
Rushabh Mehta
e421bc19f6 fix(major): frappe.db.set_value will lock the row 2020-08-17 09:41:54 +05:30
Rushabh Mehta
4d97635ab4 fix(major): frappe.db.set_value will lock the row 2020-08-17 09:41:54 +05:30
Rushabh Mehta
14d9c28eb7 fix(test): try with print_sql 2020-08-17 09:41:54 +05:30
Suraj Shetty
ed105eb001 fix: Clear db_tables cache whenever a table is created or dropped 2020-04-30 14:16:29 +05:30
Chinmay D. Pai
2f821f9c2d
chore: fix deepsource issues
* use set comprehension instead of generator
* remove redundant else statement

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-29 21:58:00 +05:30
Suraj Shetty
a73be732fd
refactor: Fix redundant cache value set 2020-04-29 16:43:01 +05:30
Suraj Shetty
bf3a80f05d fix: Directly used set comprehension
As indicated by deepsource
2020-04-29 14:39:14 +05:30
Suraj Shetty
031aad0d85 perf: Cache get_tables values
- To avoid redundant db calls
2020-04-29 12:28:08 +05:30
Dinuka Salwathura
e3dfb148e3
Change mysql host from localhost to 127.0.0.1
Having localhost makes mandatory to connect via mysqld.sock
changing host to 127.0.0.1 makes it to connect via tcp
2020-03-16 19:32:24 +05:30
Faris Ansari
488c68df96
Merge branch 'develop' into refactor-scheduler 2019-12-02 13:16:45 +05:30
Faris Ansari
2dac4f8432
fix(db.sql): Print query in debug mode (#8767) 2019-11-07 17:12:11 +05:30
Rushabh Mehta
fea34e3f6b fix(tests): test_scheduler 2019-11-07 12:14:09 +05:30
Himanshu
bf57a1d79a Patch(Tags): Check if column exists (#8682)
* fix: tags patch

* fix: auto_commit_on_many_writes

* fix: check if tag exists

* fix: check if tag or tag link exists

* fix: check if column exists

* fix: set autocommit false

* fix: use ignore in insert query for bulk insert

* fix: add option to ignore duplicates
2019-10-29 09:52:38 +00:00
Suraj Shetty
86263e05f4 perf: Cache db columns to avoid redundant database calls (#8543)
* perf: Cache db columns to avoid redundant database calls

* fix: Move cache clearing code from doctype to schema.py

* fix: self.table_name instead of self.name

* fix: Cache columns in  "table_columns" key

`table_columns` was cached in meta but columns were also getting accessed
directly using frappe.db.get_table_columns. Now, it is cached at
`frappe.db` layer

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2019-10-07 13:39:40 +00:00
Faris Ansari
f926a2aa48
Merge pull request #8488 from hrwX/global_tags
feat(Desk): Global Tags
2019-10-07 19:05:28 +05:30
John Clarke
118bba4a83
report the name of the DocType when the associated table is missing
Reported here https://discuss.erpnext.com/t/bench-migrate-fails-with-pymysql-err-programmingerror-it-doesnt-print-what-is-the-error/53540
2019-10-06 10:34:19 -06:00
Himanshu Warekar
02cebdd7d3 fix: use frappe.tags 2019-10-03 16:43:36 +05:30
Suraj Shetty
7fe35a2d3c
fix: set default value in set_value as None to avoid error.
```
frappe.db.set_value('Call Log', log.name, {
			fieldname: doc.name,
			display_name_field: doc.get_title()
		}, update_modified=False)
```
this code should not fail if value is not pass because value is passed in the dict.
2019-09-23 15:54:46 +05:30
Faris Ansari
c8a80a2e4d fix: frappe.db.field_exists
- field_exists didn't work correctly
- The call to field_exists itself was wrong
2019-09-19 15:41:17 +05:30
Faris Ansari
64f078a686 fix: Validation for invalid field name 2019-07-16 13:58:14 +05:30
Anurag Mishra
570fd44248 fix: Translating Errors and Messages 2019-07-03 11:52:47 +05:30
Aditya Hase
2c93dc74fe fix: Update regex for capturing touched tables from query (#7588)
Previous regex used to yield false positives and false negatives
for queries like

UPDATE tabToDo SET description = "something"

Instead of yielding "tabToDo" it used to yield "tabToDo SET".

Now two separate regexes handle single word and multi-word names
In case of multi-word surrounding quotes are a must
2019-05-29 14:51:19 +05:30
Rushabh Mehta
7e42520554 fix(minor): frappe.conf.db_type in sql exception 2019-05-28 12:29:39 +05:30
Rushabh Mehta
1c893e44c0 fix: frappe.conf.db_type -> frappe.db.db_type 2019-05-24 11:44:28 +05:30
Faris Ansari
7cd94e9323
fix: Print query in console if syntax error (#7371) 2019-04-29 21:37:44 +05:30
Rushabh Mehta
fce9989e1f
Merge pull request #7326 from oshosanya/allow-database-port-config
feat: Allow user to specify database port
2019-04-25 11:40:54 +05:30
Michael Oshosanya
5e97e04000 Resolve conversation 2019-04-23 06:41:33 +01:00
Aditya Hase
c29fcb02d6 feat: Maintain list of tables touched during migrate
This can be used to selectively restore changed tables from backup
after migrate failure
2019-04-23 10:31:44 +05:30
Michael Oshosanya
a0f8d3f21c Allow user to specify database port 2019-04-21 19:43:49 +01:00
Rushabh Mehta
0f1d8c7622 fix(for-patch): cache manager to ignore missing tables 2019-04-20 16:48:30 +05:30
Suraj Shetty
56dfe365ed fix: Add missing is_column_missing method (#7150) 2019-03-28 10:27:50 +05:30
Frappe Bot
bfc25ad1e5 Merge branch 'master' into develop 2019-02-15 10:21:47 +00:00