question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use msnodesqlv8 driver with typeorm

See original GitHub issue

Issue Description

Tests break when using msnodesqlv8 driver

Expected Behavior

Expect all test pass

Actual Behavior

Steps to Reproduce

  1. First issue is I have to replace this.mssql = PlatformTools.load("mssql") with this.mssql = PlatformTools.load("mssql/msnodesqlv8") in order to use msnodesqlv8 driver. Seesrc/driver/sqlserver/SqlServerDriver.ts

wonder if there is a fix for this so I don’t need this workaround.

    protected loadDependencies(): void {
        try {
            this.mssql = PlatformTools.load("mssql/msnodesqlv8");

        } catch (e) { // todo: better error for browser env
            throw new DriverPackageNotInstalledError("SQL Server", "mssql");
  1. I use msnodesqlv8 and I have the following tests failure:
test/functional/query-builder/count/query-builder-count.ts 
test/github-issues/134/issue-134.ts
test/github-issues/1716/issue-1716.ts
test/github-issues/2199/issue-2199.ts
test/github-issues/2518/issue-2518.ts
test/github-issues/4220/issue-4220.ts
test/other-issues/mssql-add-column-with-default-value/mssql-add-column-with-default-value.ts

My Environment

Dependency Version
Operating System MacOS 10.13.6
Node.js version 14.17.3
Typescript version 3.7.2
TypeORM version 0.2.34

Additional Context

Relevant Database Driver(s)

DB Type Reproducible
aurora-data-api no
aurora-data-api-pg no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql no
nativescript no
oracle no
postgres no
react-native no
sap no
sqlite no
sqlite-abstract no
sqljs no
sqlserver Yes

Are you willing to resolve this issue by submitting a Pull Request?

  • ✖️ Yes, I have the time, and I know how to start.
  • ✅Yes, I have the time, but I don’t know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dsbertcommented, Apr 4, 2022

One reason to use the other driver - it supports Trusted_Connection, where the default driver does not.

0reactions
dsbertcommented, Jul 7, 2022

Is someone still working on that ? Are there many people interested ? I had to drop TypeORM on a specific project because I needed that driver, but making the right changes to implement it could be interesting 👀

It’s possible to make it work with a few minor changes in versions < 0.3.0. I think the latest release of TypeORM does include some of these changes and may support it out of the box. However, there are some issues with the driver itself. For example - https://github.com/tediousjs/node-mssql/issues/1385

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to connect Typeorm with msnodesqlv8 using nestjs ...
I am trying to do window authentication using msnodesqlv8 in Nestjs. So, how to do this connection using TypeOrm? const mypool = new...
Read more >
msnodesqlv8 - npm
Microsoft Driver for Node.js SQL Server compatible with all versions ... Start using msnodesqlv8 in your project by running `npm i msnodesqlv8`.
Read more >
pleerock/typeorm - Gitter
but I am lost trying to specify msnodesqlv8 as the driver for typeorm ... I use gulp 3.9.1, node 10.8.0, npm 6.3.0 any...
Read more >
Interface SqlServerConnectionOptions - typeorm
Once you set domain, driver will connect to SQL Server using domain login. ... NOTE: msnodesqlv8 driver doesn't support timeouts < 1 second....
Read more >
node-mssql | Microsoft SQL Server client for Node.js
This driver is not part of the default package and must be installed separately by npm install msnodesqlv8@^2 . To use this driver,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found