Socket
Socket
Sign inDemoInstall

@clearroad/api-storage-postgresql

Package Overview
Dependencies
51
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @clearroad/api-storage-postgresql

ClearRoad API postgresql Connector


Version published
Maintainers
1
Created

Changelog

Source

0.1.0 (2019-01-23)

Bug Fixes

<a name="0.1.0-alpha.9"></a>

Readme

Source

ClearRoad API Storage PostgreSQL

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-postgresql

Usage

  1. Import the library:

Using with es6 / TypeScript

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

Using with require

const ClearRoad = require('@clearroad/api').ClearRoad;
const storage = require('@clearroad/api-storage-postgresql').default;
  1. Create a ClearRoad instance:
const options = {
  localStorage: {
    type: storage,
    host: 'host.com',
    user: 'user',
    password: 'passowrd',
    database: 'MyDatabase'
  }
};
const cr = new ClearRoad('url', 'accessToken', options);

Options

PropertyTypeDescriptionRequired
localStorage.typestringConnector type. Use postgresqlYes
localStorage.hoststringDatabase 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

Keywords

FAQs

Last updated on 23 Jan 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc