This has never worked since 2016... which can mean two things:
- No one really uses this.
- If I fix this now suddenly people will find different behaviour in
naming because `name_case` is selected in some doctypes (but never
tested)
* feat: stripping comments sent to the database API
* test: Added tests for comment stripping
* fix: only stripping comments in string fields
* refactor: removing on the fly mutations
* refactor: added helper to avoid mutations
* refactor: simplify sanitization
* refactor: removing indexing from everywhere
* refactor: readable functions
* test: only run mdb test on mdb
Co-authored-by: Ankush Menat <ankush@frappe.io>
- Only delete a single doc if we know which doc changed
- Drop all docs other wise (kinda bad, but this isn't used frequently,
will fix when visiting entire caching system again)
The implementation of syncing unique and non-unique index depended on
index names which used to be different before because of that there's
tendency to incorrectly identify index.
This PR adds a separate util for checking if a column has index without
relying on naming convention. It just goes and checks if there's any
index with that column in it, hence far more reliable.
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.
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.
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`"