extractor-pgquery

0.0.1 • Public • Published

Extractor PGQuery

This is a simple wrapper that returns a json object resulting from a select query issued to a Postgresql server.

This npm was created for a very specific use case and may not have any value for general use at this time.

Install

npm install extractor-pgquery

Usage

Sample code in coffeescript:

Extractor = require "extractor-pgquery"

config = {
  "host": "192.168.1.10",
  "database": "test_db",
  "user": "pguser",
  "password": "password",
  "port": 5432
}

testSql = "select * from sometable"

queryOutput = new Extractor(config)


successCallback = (data)->
  console.log "success!"
  console.log data

errorCallback = (e)->
  console.log "error!"
  console.log e
finallyCallback = ()->
  console.log "FINALLY..."

queryOutput.execute { sql: testSql }, successCallback, errorCallback, finallyCallback

/extractor-pgquery/

    Package Sidebar

    Install

    npm i extractor-pgquery

    Weekly Downloads

    2

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    6.87 kB

    Total Files

    12

    Last publish

    Collaborators

    • braintapper