I am setting up a Google Cloud MySQL instance (But I am willing to use anything else if this is not appropriate) I can only access the database via Javascript which is fine as I can run javascript without it displaying to the end user so I am not worried that database credentials would be leaked. (This is achieved by running a Javascript Web Hook service. The javascript is run through the services own servers and not initialised on the client side. It can even be a CRON job so no client access is required) Please though currently this is not the focus of my question and yes again I know this is far from ideal
My major concern is though of SQL Injections. I come from a PHP background which has a brilliant sanitization setup for database interactions. Of course javascript does not. Is there any other setups like Google Cloud SQL that will take care of the sanitization for me?
Please don't tell me how bad this setup is. I am limited to only using Javascript for database interactions from a HTML form. I know this is far from ideal, but this is why I am asking if there is anything that would be appropriate or if I am barking up the wro