Skip to content
Advertisement

Tag: node.js

Select and join with sequelize

How to make this code with the sequelize? I used include, but it brings all the user data but I only need the name my code: Answer If you just want to reduce User model attributes then just indicate needed attributes in the attributes option: If you want to add a user’s name as a string prop at the same

Nested SQL.promise() callback in Javascript

I want to write a nested callback JavaScript in order to use the subsequent ID’s of the INSERT statements in the different SQL tables. My code looks as follows: However, when trying to run this with Node.js it says Error: Callback function is not available with promise clients. Do you have a solution to retrieve the insert IDs for the

Advertisement