npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rm-data-access

v0.0.4

Published

A simple module to access RM databases and stored prodedures.

Readme

rm-data-access

A simple module to access RM databases and stored prodedures.

Installation

To install using npm.

npm install 

Usage

The steps to call a procedure is to:

  1. Create a data-access object

var dataaccess = require('data-access');

  1. Attach a prepopulated connection object with the parameters you require for the call.

dataaccess.connection = {};

  1. Call dataaccess.rmSql() then wait for the results or catch the error.

dataaccess.rmSql() .then((results) =>{}) .catch((error) => {})

Example

The following will access the RM_PA_DuFast database on the GLASSITER65530\MSSQLSERVERR2 server, calling the spAlertActualsGetByDateRange2 with the following paramaters:

  • @AgencyId INT = 1
  • @StartDateTime DATE = '2017-03-27 05:26:22'
  • @EndDateTime DATE = '2017-03-27 05:26:22'
  • @ProfileTypeId INT = 3

using default options:

var debug = require("debug")('alert');

exports.alerts = function(req, res) {
var dataaccess = require('../data-access.js');  

  var dbConnection = {
      server: 'GLASSITER6530\\MSSQLSERVERR2',
      database: 'RM_PA_DuFast',
      proc: 'spAlertActualsGetByDateRange2',
      params: [
        {
          name: "AgencyID",
          type: dataaccess.sqlType.Number,
          value: 1
        },
        {
          name: "StartDateTime",
          type: dataaccess.sqlType.Date,
          value: new Date('2017-03-27 05:26:22')
        },
        {
          name: "EndDateTime",
          type: dataaccess.sqlType.Date,
          value: new Date('2017-03-27 13:26:22')
        },
        {
          name: "ProfileTypeId",
          type: dataaccess.sqlType.Number,
          value: 3
        }                     
      ]
  };

  dataaccess.connection = dbConnection;
  dataaccess.rmSql()
  .then((results) => {
    var json = JSON.parse(results);

    debug("Successful execution from data-access:  ");    
    debug("results:  " + results);

    res.send({"results" : json});        
  })
  .catch((err) => {
    debug("Error received from data-access:  " + err);
  }); 
};

Defaults

The module uses these defaults when connecting to a database:

exports.SERVER = 'GLASSITER6530\\MSSQLSERVERR2';
exports.CONTEXT = ':V:^RMDataAccess#0.00^:Z:^&N&#RMBus#&S&#L#&UID&#13#&AGN&#1#^';
exports.USERNAME = 'pmuser';
exports.PASSWORD = 'pmtrip00';
exports.PORT = 49725;

These exports can be overriden by modifying the exported property.

exports.USERNAME = 'geemony';

Supplying a corresponding property to the connection object will use the connection object's property when making the call.