Good day,
I'm trying to transition one of my flows away from using global context, to MySQL so the data is available to other sources outside Node-RED.
It's a real headache.
The function in question is rather complex (circa 800 lines) and processes an incoming payload, saving / retrieving various values to context as it runs... The question is, how can I transfer this to MySQL?
In essence I need a way to save / retrieve values from the database inside my function node (to access stored data, or update stored data). I've tried using node.send to dynamically generate the topic payload for the MySQL node (sent via a dedicated output), but it's way too quirky and complex generating the query strings.
Can anyone point me in the right direction, I'm likely not seeing an obvious solution...?