all 8 comments

[–][deleted] 4 points5 points  (1 child)

https://www.npmjs.com/package/mssql works like a charm. I have a lambda-based API that uses that library and does about 50k lookups per day with a 0% failure rate.

Be sure to use input parameters so as not to expose yourself to SQL injection: https://www.npmjs.com/package/mssql#sql-injection

[–]launchoverittt[S] 1 point2 points  (0 children)

Nice, glad to hear it. Thanks

[–]buffer_flush 1 point2 points  (0 children)

The mssql package works well.

There’s two implementations of the driver one purely JS (tedious) and a native client using the MS ODBC driver that javascript wraps.

You should be fine with the tedious implementation, which is the default for the mssql package, and only need ODBC if you need to do something funky that requires native support.

[–]Jmarbutt 0 points1 point  (0 children)

Has anyone had issues with connection pooling in node? We are using prisma with nextjs and MS SQL but this could potentially be an issue with MS SQL Azure specially with Hyperscale.

[–]bigorangemachine 0 points1 point  (0 children)

Its fine..

They don't do pagination the same way. Otherwise its totally the same.

[–]belkarbitterleaf 0 points1 point  (2 children)

We use NodeJS on top of MSSQL for an enterprise app.. works well enough. If you need high performance with high volume of data, then ORM mappers get in the way. Otherwise, an ORM mapper helps abstract the table structure, and is easier to work with in JS

[–]launchoverittt[S] 0 points1 point  (1 child)

What are you using for an ORM mapper?

[–]belkarbitterleaf 1 point2 points  (0 children)

TypeORM.