Ankush Menat
8ed2c87e00
perf: fix unneneccsary clearing of db.value_cache
2021-08-06 13:02:23 +05:30
Shariq Ansari
fd99f4bb61
Merge branch 'frappe:develop' into icon-picker
2021-08-03 12:47:44 +05:30
Gavin D'souza
f7b8f86666
Merge branch 'develop' of github.com:frappe/frappe into aks-orm
2021-07-30 13:10:59 +05:30
mergify[bot]
8dfbc14852
Merge pull request #13786 from hasnain2808/optimize-bench-migrate
...
perf: optimize recollecting routes for bench migrate
2021-07-30 06:37:13 +00:00
saxenabhishek
42dc8a180f
refactor: get_table_name, run_only_if
2021-07-30 11:48:12 +05:30
saxenabhishek
7671e78487
style: minor fixes and improvements
2021-07-30 11:29:41 +05:30
saxenabhishek
45d1afe739
refactor: move rename, change_column_type, DESC to db
2021-07-30 11:00:35 +05:30
saxenabhishek
ee3c84beef
style: typecast to string inside db.sql
2021-07-30 11:00:35 +05:30
Gavin D'souza
b40721de4b
style: Remove extra whitespace
2021-07-29 12:53:43 +05:30
Gavin D'souza
3ca7fa7796
refactor(minor): Make frappe.db.delete DRY-er
2021-07-28 19:01:07 +05:30
hasnain2808
17e7f557a1
Merge branch 'develop' of https://github.com/frappe/frappe into optimize-bench-migrate
2021-07-27 13:36:34 +05:30
hasnain2808
36feb72c89
fix: add column entries in doctypes
2021-07-27 11:29:00 +05:30
Aradhya-Tripathi
2f3371d873
refactor: Moved raw queries to frappe orm
2021-07-23 23:14:24 +05:30
Gavin D'souza
36c4be9a8d
feat: frappe.db.truncate
...
ORM wrapper for SQL DDL statement
* Alias frappe.db.clear_table to use truncate
* Support for __ tables is added here
2021-07-23 11:52:41 +05:30
Gavin D'souza
1c82b83be0
refactor: Simplify frappe.db.delete logic
...
* Rename conditions kwarg to filters. Handle conditions kwarg if passed
* Re-added exc raise for no filters...to risky. Thinking of having an
extra kwarg like `force` or something...undecided
* Added Python type hints
* Accept and pass kwargs to frappe.db.sql...Now pass any kwarg db.sql
accepts
* Pass debug from fn def if someone is still using it as a positional
arg :thonk:
2021-07-23 11:30:02 +05:30
Aradhya-Tripathi
bc39fd869f
fix: Fixed typos
2021-07-23 10:45:54 +05:30
Aradhya-Tripathi
931549ee05
refactor: changed delete to accept no conditions
2021-07-21 19:20:35 +05:30
Shariq Ansari
e3e26dd8d6
Merge branch 'develop' into icon-picker
2021-07-14 13:50:39 +05:30
shariquerik
b6c71251a3
feat: Icon Picker
2021-07-10 21:58:57 +05:30
Mitul David
64840aac6b
refactor(minor): Delete redundant imports
2021-07-06 14:13:27 +05:30
Mitul David
a1e84d2341
fix: Accurately cast fieldtype in frappe.db.get_single_value()
2021-07-06 13:28:18 +05:30
Gavin D'souza
c489846547
Merge branch 'develop' into unnecessary_comprehensions
2021-06-11 19:30:23 +05:30
Gavin D'souza
e407b78506
chore: Drop dead and deprecated code
...
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
...
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
leela
72ca7e9753
refactor: remove six dependency
2021-05-07 07:42:04 +05:30
Gavin D'souza
0ad122421d
fix: Don't hide warnings unnecessarily
2021-05-05 18:51:51 +05:30
Rohan Bansal
86851028ea
feat: manage Python 3 compatiblity with dependencies
2021-04-14 14:40:58 +05:30
Aditya Hase
2b1458e3fb
fix: Include dropped and renamed tables in touched tables list
2021-04-12 22:29:49 +05:30
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
Chinmay Pai
043a6c0804
Merge branch 'develop' into virtual_doctype
2021-03-17 20:18:44 +05:30
Aditya Hase
b0456503f2
perf: Remove frappe.utils.background_job from import tree
2021-02-21 09:42:04 +05:30
Aditya Hase
2413f7e6ec
perf: Replace markdown2.UnicodeWithAttrs with frappe.utils.UnicodeWithAttrs
2021-02-21 09:41:10 +05:30
Chinmay Pai
bcbe162367
chore: change an instance of virtual_doctype to is_virtual
2021-01-11 13:13:39 +05:30
Shridhar Patil
3aebcb1691
chore: clean up database schema sync for virtual doctype
...
Co-authored-by: Chinmay D. Pai <chinmay.pai@zerodha.com>
Signed-off-by: Chinmay D. Pai <chinmay.pai@zerodha.com>
2021-01-11 13:13:39 +05:30
Shridhar
42d889d2a4
fix: handle virtual doctype flag for existing doctypes
2021-01-11 13:13:38 +05:30
Shridhar
0b4940f017
fix: skip table creation for virtual doctype
2021-01-11 13:13:37 +05:30
Rushabh Mehta
c873c36971
feat(minor): add before_commit methods
2020-12-17 18:46:06 +05:30
everyx
f71a8e0afc
fix: PRIMARY KEY must be NOT NULL error when install with MySQL 5.7+
2020-11-24 14:36:53 +08:00
Gavin D'souza
3b5ec6aa88
fix: Sider + improper command ending
2020-11-17 12:45:55 +05:30
Gavin D'souza
c4e57926f9
feat(postgres): Show restore progress if pv is available
2020-11-17 12:33:21 +05:30
Gavin D'souza
142b6009fe
fix: Better error message on missing table
2020-11-10 10:49:40 +05:30
Gavin D'souza
e8fdaa195b
refactor: PostgreSQL module methods correspond to MariaDB
...
* Added bootstrap_database, import_db_from_sql function APIs similar
to MariaDB implementations
2020-11-09 18:55:29 +05:30
Gavin D'souza
b371c70053
refactor: Meaningful variable names
2020-11-09 18:54:47 +05:30
Gavin D'souza
7b1fa59a29
feat: Restore partial backups via bench partial-restore
2020-11-09 18:51:33 +05:30
Rushabh Mehta
1df7831d67
fix(minor): postgres/database.py error handling for missing table
2020-10-26 12:24:11 +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