Commit graph

385 commits

Author SHA1 Message Date
Shridhar Patil
39f8267a15
feat: added support for data type json (#16187)
> Please provide enough information so that others can review your pull request:

Added json support for postgres and mariadb



> Explain the **details** for making this change. What existing problem does the pull request solve?
https://github.com/frappe/frappe/projects/4#card-50160428


> Screenshots/GIFs
![json](https://user-images.githubusercontent.com/11792643/156367383-8f8492c2-3817-449d-a2dd-c983eeadbb48.gif)



---

**Previous attempts:** 

https://github.com/frappe/frappe/pull/8128
https://github.com/frappe/frappe/pull/7096


Docs: https://frappeframework.com/docs/v13/user/en/basics/doctypes/fieldtypes#json
2022-04-14 04:21:41 +00:00
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Gavin D'souza
ce5ac24b61 feat(db): Set frappe.db.debug to mass debug queries 2022-04-04 15:15:51 +05:30
gavin
278827cb18
Merge pull request #16468 from gavindsouza/misc-fixes-8
fix(utils): Misc fixes
2022-04-01 17:28:40 +05:30
gavin
3f6bbd6349
Merge pull request #16474 from resilient-tech/perf-get-doc-filters
perf: reduce query when calling `get_doc` with filters
2022-04-01 15:53:55 +05:30
Sagar Vora
e73c552632 fix: implement for_update for Single documents 2022-04-01 14:15:35 +05:30
Sagar Vora
493c7025f5 fix(get_value): make as_dict work for list-style filters 2022-04-01 00:33:15 +05:30
Gavin D'souza
69df3edba3 fix(query): Typo in OPERATOR_MAP 2022-03-31 16:24:03 +05:30
Gavin D'souza
10e4ed7c1e fix(query): Add human friendly operator oprions 2022-03-31 13:38:32 +05:30
Ankush Menat
c4ca58fedf refactor: query stripping 2022-03-28 10:56:55 +05:30
Ankush Menat
456cba71cd refactor: expand unreadable one-liner in get_value 2022-03-28 10:56:55 +05:30
Ankush Menat
3e1df641da fix: force keyword arguments in new ORM args 2022-03-28 10:56:55 +05:30
gavin
a7f1639e65
Merge branch 'develop' into log-settings 2022-03-23 13:20:33 +05:30
Gavin D'souza
300227ba71 fix(set_single_value): Make value parameter optional
Similar to set_value for accepting multiple columns ot be updated for
the same Table through a Dict as the second positional arg

Misc: Added type hints
2022-03-23 13:11:55 +05:30
barredterra
44a7c0dd93 fix: copy dict before popping keys 2022-03-21 20:51:59 +01:00
Suraj Shetty
a1664330a7
Merge pull request #16344 from frappe/mergify/bp/develop/pr-16239 2022-03-21 20:49:33 +05:30
Shariq Ansari
5c6c9bb5c4
fix: resolved conflicts in database.py 2022-03-21 18:16:54 +05:30
Shariq Ansari
fbac6fbfb4 fix: only remove \n\t from start and end
(cherry picked from commit 7bb172365f2c9ae6cca98ccc4dfee7714b9c3f0c)

# Conflicts:
#	frappe/database/database.py
2022-03-21 05:50:58 +00:00
Shariq Ansari
b2c0bf7a4e fix: remove tab \t and newlines \n from start of query and remove from middle
(cherry picked from commit ac5effc7dd4d876d06daf945f0b8b77ecdd0c05f)

# Conflicts:
#	frappe/database/database.py
2022-03-21 05:50:57 +00:00
Ankush Menat
b97cfed6d7 perf: limit rows to 1 for get_value and exists 2022-03-21 11:19:28 +05:30
mergify[bot]
f47331cd1d
Merge pull request #16200 from alyf-de/refactor-db-exists
refactor: `frappe.db.exists`
2022-03-21 05:47:27 +00:00
gavin
e696a8d73a
Merge pull request #16305 from gavindsouza/drop-site-pg
feat: Drop site support for postgres
2022-03-17 15:44:42 +05:30
barredterra
7e550e919c revert: don't check for doctype (861ff16) 2022-03-17 02:07:23 +01:00
Gavin D'souza
2558c6bee0 feat: Drop site support for postgres 2022-03-16 19:06:33 +05:30
phot0n
15ae019b12 fix: set_next_val function for sequences
postgres uses t & f, mariadb uses 0 & 1 for is_value_used
2022-03-11 23:46:01 +05:30
phot0n
bebc8058b6 feat: integer primary keys 2022-03-11 23:46:00 +05:30
Gavin D'souza
ad1e180666 feat(db): Alias is_missing_table for consistency in APIs 2022-03-11 14:03:21 +05:30
mergify[bot]
41ffb79828
Merge pull request #16250 from resilient-tech/typo-database-py
fix: typo in database file for v12 - latest
2022-03-11 08:27:43 +00:00
lapardnemihk1099
f4d3effaf2 fix: typo in database file for v12 - latest 2022-03-11 13:29:01 +05:30
Sagar Vora
a6d991272e fix: sider warning 2022-03-10 09:38:32 +05:30
Sagar Vora
5d93907a19 fix: improve modify_query regex 2022-03-10 09:28:13 +05:30
barredterra
861ff16ac8 refactor: frappe.db.exists 2022-03-05 19:53:45 +01:00
ChillarAnand
13b61f8a1d Merge branch 'develop' into none 2022-02-28 15:11:07 +05:30
Saqib Ansari
7ce128de6c Merge branch 'develop' of https://github.com/frappe/frappe into autocomplete-control 2022-02-25 15:49:13 +05:30
ChillarAnand
a079ea7957 Merge branch 'develop' into none 2022-02-25 11:26:09 +05:30
Revant Nandgaonkar
cdc6bcadb1
fix(cli): Database agnostic options for root db credentials (#15973)
* fix(bench): new-site params for root db credentials

allow root credentials for postgresql
use common cli option name for both database types

* fix(bench): backward compatible db params

Co-authored-by: gavin <gavin18d@gmail.com>

* fix(bench): use common db cred params

use --db-root-username and --db-root-password

* feat(bench): add --set-default to bench new-site

* fix: do not set default root user

* fix: indentation

Co-authored-by: gavin <gavin18d@gmail.com>
2022-02-25 09:58:59 +05:30
ChillarAnand
5ce3937d79 fix: Handle None filters in db query 2022-02-24 15:19:31 +05:30
Ankush Menat
2580561788
Merge pull request #16067 from cpdeethree/postgres-fix-table-creation
fix: error in table creation from incorrect scope
2022-02-22 12:36:57 +05:30
Ankush Menat
33890ed860 refactor: use f-strings instead of .format and % 2022-02-22 11:23:51 +05:30
cpdeethree
b2116ff36d fix: error in table creation from incorrect scope 2022-02-21 20:27:05 -06:00
barredterra
745297a49d refactor: a not in b
Search: if not ([\w\d]*?) in ([\w\d]*?)
Replace: if $1 not in $2
2022-02-21 19:54:34 +01:00
Saqib Ansari
9e6889fc6d Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-15 10:12:52 +05:30
Ankush Menat
c38d1f8a25
Merge pull request #15906 from ankush/ignore_duplicates_db
feat(db/pg): ability to ignore pk collision
2022-02-14 18:58:07 +05:30
Saqib Ansari
6b671af1ec Merge branch 'develop' into autocomplete-control 2022-02-14 12:29:23 +05:30
Suraj Shetty
abec0d8664
Merge branch 'develop' into link_title_refactor 2022-02-14 11:03:55 +05:30
Saqib Ansari
8f277a247e Merge branch 'develop' of https://github.com/frappe/frappe into autocomplete-control 2022-02-12 16:27:27 +05:30
Ankush Menat
1439e667b2 chore: add debug status temporarily 2022-02-09 16:25:39 +05:30
Saqib Ansari
6e0c4946f1 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-09 10:43:34 +05:30
Gavin D'souza
0482f1362a Merge branch 'develop' of github.com:frappe/frappe into dynamic-docfields 2022-02-08 16:50:58 +05:30
phot0n
a6ea0c9e37 fix: add index on parent in child table doctype 2022-02-07 17:49:37 +05:30