Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oracle-gopher

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oracle-gopher

Boilerplate Node.js middleware that facilitates connections and transactions with Oracle databases.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

oracle-gopher

Boilerplate Node.js middleware that facilitates connections and transactions with Oracle databases.

Requirements

  • Connects Node.js 0.10, Node.js 0.12
  • Oracle Instant Client

Setup

A) Oracle Instant Client Download
  1. Download the following TWO Oracle Instant Client Packages (here: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html ). Please make sure to download the correct packages for your system architecture (i.e. 64 bit vs 32 bit)

    • Instant Client Package - Basic or Basic Lite: Contains files required to run OCI, OCCI, and JDBC-OCI applications

    • Instant Client Package - SDK: Contains additional header files and an example makefile for developing Oracle applications with Instant Client

B) Oracle Instant Client Installation and Configuration (this example procedure is for Mac OS X 64bit ONLY)

From a terminal window:

  1. Unzip files:
unzip instantclient-basic-macos.x64-11.2.0.4.0.zip -d /oracle
unzip instantclient-sdk-macos.x64-11.2.0.3.0.zip -d /oracle
  1. Update your .bashrc file by appending and saving the following block of code:
##### Oracle Instant Client 11.2 #####
OCI_HOME=/oracle/instantclient_11_2
OCI_LIB_DIR=$OCI_HOME
OCI_INC_DIR=$OCI_HOME/sdk/include
OCI_INCLUDE_DIR=$OCI_HOME/sdk/include
OCI_VERSION=11
DYLD_LIBRARY_PATH=$OCI_LIB_DIR
  1. Create the following symbolic links from within your Instant Client directory (e.g. /oracle/instantclient_11_2):
cd /oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
ln -s libocci.dylib.11.1 libocci.dylib
  1. Restart your Terminal application
C) oracle-gopher Installation
 npm install oracle-gopher

Usage

A) Example
var Gopher = require('oracle-gopher');
var tunnel = {
        user             : "USERNAME",   //mandatory
        password         : "PASSWORD",   //mandatory
        connectString    : "HOST:PORT/SERVICE"  //mandatory
    };
var gopher = new Gopher(tunnel);

/*-------------------------------Foraging for Data-------------------------------*/

//Set Foraging Instructions via the Garden Object:
var garden = {
        dbStatement     : "SELECT dummy FROM DUAL WHERE dummy = :DummyValue", //mandatory
        outputFormat    : "array", //not mandatory.  will use default if not explicitly set.
        maxRowsReturned : 100, //not mandatory.  will use default if not explicitly set.
        bindVariables   : {"DummyValue" : "X"} //not mandatory.  use in conjunction with dbStatement when bind variables are present.
    };

// Send Gopher on it's way to return with data...
gopher.forage(garden,
    function(err,result){
        if (err) {
            return console.log(err);
        }
        return console.log(result);
    }
);

Keywords

FAQs

Package last updated on 22 Sep 2015

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc