Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@clearroad/api-storage-mssql

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clearroad/api-storage-mssql

ClearRoad API mssql Connector

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

ClearRoad API Storage Microsoft SQL Server

Note: 5 databases will be created to store the data, all prefixed with the database value (see below). Make sure you use credentials that have the rights to create databases.

Install

npm install @clearroad/api-storage-mssql

Usage

  • Import the library:

Using with es6 / TypeScript

import { ClearRoad } from '@clearroad/api';
import storage from '@clearroad/api-storage-mssql';

Using with require

const ClearRoad = require('@clearroad/api').ClearRoad;
const storage = require('@clearroad/api-storage-mssql').default;
  • Create a ClearRoad instance:
const options = {
  localStorage: {
    type: storage,
    server: 'host.com',
    user: 'user',
    password: 'passowrd',
    database: 'MyDatabase'
  },
  useQueryStorage: true // we cannot query directly with the storage, so wrap in a query storage
};
const cr = new ClearRoad('url', 'accessToken', options);

Options

PropertyTypeDescriptionRequired
localStorage.typestringConnector type. Use mssqlYes
localStorage.serverstringDatabase hostYes
localStorage.userstringDatabase userYes
localStorage.passwordstringDatabase passwordYes
localStorage.databasestringDatabase nameYes
localStorage.documentsTableNamestringDatabase table name to storage all documents. Default is documentsNo
localStorage.attachmentsTableNamestringDatabase table name to storage all attachments. Default is attachmentsNo
localStorage.timestampsbooleanAdd createdAt and updateAt fields on each row. Default is trueNo
useQueryStoragebooleanStorage needs to be wrapped in a QueryStorage. Use trueYes

Keywords

clearroad

FAQs

Package last updated on 23 Jan 2019

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