Ankush Menat
d3f768fef9
feat(db/pg): ability to ignore pk colission
2022-02-09 16:25:36 +05:30
mergify[bot]
819202f5da
Merge pull request #15560 from gavindsouza/set_value-refactor
...
refactor: frappe.db.set_value
2022-02-02 06:41:58 +00:00
Saqib Ansari
bd8ac90286
fix(ux): show report button on too many writes error ( #15614 )
...
* feat: log errors on too many writes to ease debugging
* fix(ux): extract and show which app/file/function caused too many writes
* fix: postgres error checking assumes exception is postgres exception
* fix: better default for skipping frames
Typically stack is like: some_app -> your_function -> this function. So last 2 frames need to be skipped.
* fix: postgres error checking assumes exception is postgres exception
* fix: better default for skipping frames
Typically stack is like: some_app -> your_function -> this function. So last 2 frames need to be skipped.
* refactor: show Report button instead of logging
* revert: unnecessary new functionality
* test: assert exact exception
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-01-31 18:57:32 +05:30
Gavin D'souza
9f1503c582
test: Postgres compatible db tests
2022-01-11 12:54:18 +05:30
Gavin D'souza
202145f0ec
test: Add tests for frappe.db.set_value
2022-01-10 21:01:02 +05:30
Ankush Menat
e08b41964c
feat: savepoint contextmanager
...
syntactic sugar around frappe.db.savepoint and rollback
2022-01-03 22:20:39 +05:30
Ankush Menat
1c0de77634
feat: SQL savepoints
2021-12-20 23:07:53 +05:30
Aradhya
7faa843e97
feat: Added distinct in get_value
2021-12-17 15:01:24 +05:30
Aradhya
e1360a3770
test: Added tests for distinct in get values
2021-12-17 13:45:57 +05:30
Aradhya
e862ae83da
fix: fixed list of Field objects as fields in get_values
...
tests: added test for list of field objects
2021-12-03 14:24:19 +05:30
Aradhya
59f54aa60c
refactor: changed default_ordering to keep_default_ordering
2021-11-23 15:26:15 +05:30
Aradhya
9ccf467acb
fix: fixed no order arg in converted queries
2021-11-23 13:30:42 +05:30
Aradhya
d37aa55607
fix: fixed merged conflicts
2021-11-18 18:13:10 +05:30
Aradhya
a3c992bce4
fix: fixed order in get_values tests
2021-11-16 23:41:23 +05:30
Aradhya-Tripathi
41f285b13e
feat: Added test cases for get values
2021-11-14 21:46:06 +05:30
Aradhya-Tripathi
97f85c88e2
feat: Added tests for Criterion objects in get_value
2021-11-08 15:57:06 +05:30
Aradhya-Tripathi
d6b9781163
feat: Added test to assert lock for pypika objects
2021-10-23 15:08:28 +05:30
Aradhya-Tripathi
162645d703
fix: fixed get_value tests
2021-10-05 16:23:37 +05:30
Aradhya-Tripathi
4919d1ba62
feat: Added tests for get_value with sql functions
2021-10-05 16:02:51 +05:30
Aradhya-Tripathi
73eb7806a8
refactor: removed aggregation from database.py
...
refactor: moved aggregate to frappe.query
2021-09-20 22:47:06 +05:30
Abhishek Saxena
1d02d26a2b
Merge branch 'develop' into aks-fix-postgres
2021-09-07 17:42:03 +05:30
Your Name
74d6ed32d6
test: add frappe.db.add_index
2021-09-07 17:40:55 +05:30
Rushabh Mehta
d807e3b1e2
fix(minor): fix for aggregate functions, use special query
2021-09-06 09:11:58 +05:30
Rushabh Mehta
20dea90670
feat(minor): Packages! also cleanup of DocField and other minor fixes
2021-09-05 22:01:55 +05:30
Gavin D'souza
3446026555
chore: Update header: license.txt => LICENSE
...
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
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
9423861c34
test: for db rename, change_column_type, describe
2021-07-30 11:29:23 +05:30
Mitul David
42585579e6
refactor: Replace str.format() with f-strings
2021-07-12 19:13:29 +05:30
Mitul David
934fc17a3b
refactor: Improve readability, consistency
2021-07-12 15:52:57 +05:30
Mitul David
95550861a7
refactor(minor): Fix indentation
2021-07-09 18:48:12 +05:30
Mitul David
1e839f0ab1
test: Add test for frappe.db.get_single_value
2021-07-09 18:36:06 +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
7933b9c825
chore: replace assertNotEquals with assertNotEqual
2021-05-06 21:23:04 +05:30
Sagar Vora
7c239fe084
test: reduce chance of failure by stricter comparison
2021-03-17 01:41:03 +05:30
Rushabh Mehta
ceb1ecce73
fix(minor): test_db.py
2020-10-26 14:16:23 +05:30
Rushabh Mehta
0b93784b32
fix(minor): test_db.py
2020-10-26 14:13:38 +05:30
Gavin D'souza
e812fb7da5
test: Update test_db_keywords_as_fields for postgres
...
* Updated styling to fit word limit
2020-10-12 18:36:26 +05:30
Gavin D'souza
992f66e044
test: Use standard distinct
2020-10-12 18:05:04 +05:30
Gavin D'souza
5097d9cd6e
test: Updated tests with changed DatabaseQuery.prepare_args
...
behaviour
2020-10-12 15:47:28 +05:30
marination
22b013364e
fix: Test for 'distinct' keyword
2020-10-07 16:04:29 +05:30
Gavin D'souza
309508b422
test: Test for reading aliased field query
2020-09-24 13:28:58 +05:30
Gavin D'souza
4cfc4c90d8
test: Use lowercase fields
2020-09-24 10:59:43 +05:30
Gavin D'souza
6cf7e4575f
fix: Precision shouldn't be allowed as its a meta attrib
...
Fieldname precision conflicting with meta object
2020-09-23 19:11:59 +05:30
Gavin D'souza
646f29f628
test: Test for RU using DB reserved keywords
...
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-09-23 18:56:20 +05:30
Gavin D'souza
6f4931845e
test: test once for 40 keyword fields instead
2020-09-23 17:19:10 +05:30
Gavin D'souza
ba0ac381f4
test: Fix fields added in doctype
2020-09-23 16:52:23 +05:30
Gavin D'souza
471202585c
fix: Sider
2020-09-23 16:17:53 +05:30
Gavin D'souza
21c898583f
test: Add test for creating doctypes with fields for reserved db
...
keywords
2020-09-23 16:12:48 +05:30
Rushabh Mehta
0192bcf45f
fix(minor): frappe.db.set_value to allow multiple values
2020-08-17 22:19:44 +05:30