New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tediousjs/connection-string

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tediousjs/connection-string

SQL ConnectionString parser

0.6.0
latest
Source
npm
Version published
Weekly downloads
656K
-10.86%
Maintainers
2
Weekly downloads
 
Created

What is @tediousjs/connection-string?

@tediousjs/connection-string is a utility package designed to parse and format connection strings for use with the Tedious library, which is a TDS (Tabular Data Stream) protocol implementation for Node.js. This package helps in managing and manipulating connection strings for SQL Server databases.

What are @tediousjs/connection-string's main functionalities?

Parsing Connection Strings

This feature allows you to parse a connection string into a configuration object that can be used with the Tedious library. The `parseConnectionString` function takes a connection string and returns an object with the parsed details.

const { parseConnectionString } = require('@tediousjs/connection-string');
const connectionString = 'Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;';
const config = parseConnectionString(connectionString);
console.log(config);

Formatting Connection Strings

This feature allows you to format a configuration object into a connection string. The `formatConnectionString` function takes a configuration object and returns a connection string that can be used to connect to a SQL Server database.

const { formatConnectionString } = require('@tediousjs/connection-string');
const config = {
  server: 'myServerAddress',
  authentication: {
    type: 'default',
    options: {
      userName: 'myUsername',
      password: 'myPassword'
    }
  },
  options: {
    database: 'myDataBase'
  }
};
const connectionString = formatConnectionString(config);
console.log(connectionString);

Other packages similar to @tediousjs/connection-string

Keywords

mssql

FAQs

Package last updated on 11 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts