Sequelize - MS SQL - Many sets of stored procedure results that are combined into a single array

We use Sequelize with MS SQL to retrieve data by executing stored procedures. The stored procedure runs as a RAW request.

Example:

EXEC spGetSummaryData; 

The problem occurs when the spGetSummaryData procedure returns 2 result sets as a result of execution, but the result sets are combined into a single array.

  sequelize.query("EXEC spGetSummaryData;", { type: sequelize.QueryTypes.RAW}) .then(function(summary) { // Summary has both the result sets merged into a single array. }) 

How to get arrays of results divided into two different arrays than one?

+5
source share

Source: https://habr.com/ru/post/1236063/


All Articles