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 🙏

© 2024 – Pkg Stats / Ryan Hefner

noradle-nodejs-client

v0.14.2

Published

noradle protocol client to access oracle plsql servlet

Downloads

8

Readme

introduce

noradle-nodejs-client use noradle-protocol to connect to noradle-dispatcher, access oracle plsql servlet.

it support the following noradle modules:

let client to connect to dispatcher

var DBDriver = require('noradle-nodejs-client').DBDriver;
var dbPool = DBDriver.connect([port, ip], {cid:"xxx", passwd:"xxx"});
  • first parameter for DBDriver.connect is the same as node's socket.connect(), id can be [port], [port,ip] or [path].
  • secondary parameter for noradle.DBDriver.connect is client's client id and password for dispatcher

Use internal rudimentary API to access ORACLE

it's like a node http request API with a db-driver like find free path to server beforehand.


dbPool.findFree(env, db_selector, function(err, oraReq){
  // env: identifier or marker for the request for logger or monitor
  // db_selector: when dispatcher hold OSP from RAC/DG instances, specify the selection rule
  // when dbPool find a free access slot, findFree callback will be called with a new oraReq instance
  if (err) {
    // basically, there are no error for dbPool.findFree
    console.error(err);
    return;
  }
  oraReq
    .init('DATA', '')
    .addHeader('uid', 'kaven276')
    .addHeaders({dbu:'demo',prog:'show_user_name_b'}, 'x$')
    .write(body)
    .on('response', onResponse)
    .on('error', onError)
    .end(onResponse)
  ;
  // .addHeader(s) can add name/value(s) pair that can be got by pl/sql r.getx series API
  // .write(body) data will fill pl/sql package variable rb.blob_entity
  // .end(onResponse) can is just .on('response', onRepsonse).end() combined
  // any exception for the request/response cycle will emit error
  // any pl/sql servlet call must have x$dbu,x$prog headers to specify which PL/SQL procedure to execute
  function onResponse(oraRes) {
     console.log(oraRes.status, oraRes.headers);
     oraRes.on('data', function(data){
       ...
     }
     oraRes.on('end', function(){
       ...
     }
  }
  function onError(error){
    ...
  });