Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature - Support for JSON parameter in MSSQL connection string #5200

Merged
merged 1 commit into from May 29, 2022

Conversation

ByteOPCode
Copy link
Contributor

@ByteOPCode ByteOPCode commented May 29, 2022

Issue:

The existing parser implementation does not parse the nested properties from the connection string for MSSQL (Tedious supports properties like InstanceName, TDS Packet size, readOnlyIntent under options key, which can not be passed to knex over connection string at the moment).

Example Connection string :

mssql://user:password@host/database?domain=testDomain&options={"instanceName": "TestInstance001", "readOnlyIntent": true}'

Actual Config

{
  user: 'user',
  password: 'password',
  database: 'database',
  server: 'host',
  domain: 'testDomain',
  options:'{"instanceName": "TestInstance001", "readOnlyIntent": true}'
}

Expected Config

{
  user: 'user',
  password: 'password',
  database: 'database',
  server: 'host',
  domain: 'testDomain',
  options: {
    instanceName: 'TestInstance001'
    trustServerCertificate: true
  }
}

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.223% when pulling ada10b0 on ByteOPCode:master into 8bb9e83 on knex:master.

Copy link
Collaborator

@OlivierCavadenti OlivierCavadenti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for the PR !

@OlivierCavadenti OlivierCavadenti merged commit 8a50dd7 into knex:master May 29, 2022
@ByteOPCode
Copy link
Contributor Author

Hi, may I know - when can we have a release ?

@kibertoad
Copy link
Collaborator

Released in 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants