How to insert data in Azure SQL using tedious.js after verifying that the data doesn't exists in the database?
问题 This is the first time I'm using tedious.js , I still don't understand it a lot. I'm mostly going over their documentation here. Following is the logic in the POST method. Check if the tag already exists for the given statement id If the tag exists, return the message to the client If the tag doesn't exist, insert the tag in the database. This is my post method in express.js to add "tag" // POST add tags router.post('/tag', function(req, res){ // get the body const data = req.body; // sql