Public version of _process_params() to work on bytes and/or strings - OR - How to _process_params (escape, quote and type-transform) mysql parameters to use outside of mysql-connector/python - OR - cursor.py: _process_params(): returned strings (0.1.5), now bytes (0.3.2)
We have a mysql query stored as STRING in a mysql table.
This query needs to be modified within python code.
We used _process_params() to make sure things are well escaped.
This worked fine on our string within 0.1.5:
strings --into--> _process_params() --> strings out of it
Now in 0.3.2 _process_params() this changed:
strings --into--> _process_params() --> bytes out of it
I understand why this makes sense (to be able to handle byte (data) parameters).
But I was wondering if you could maybe provide a /public/ .processParams() function within cursor (or elsewhere) to use for the above use case.
And also make it usable for a string --> string case and bytes --> bytes (so to preserved whatever type it got passed in.
Thanks!
tormen
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
- Whiteboard:
- Sorry about this question expiring. Yes, it makes sense to have some public function to process parameters, to make them ready for MySQL. We will consider it. Just need time to do it! :)
Can you help with this problem?
Provide an answer of your own, or ask tormen for more information if necessary.