<commit_before># Oracle Pool for Node.js

Taking generic-pool(https://github.com/coopernurse/node-pool) and the oracle driver (https://github.com/joeferner/node-oracle) to create a very basic pool of Oracle connections.

# Basic installation

* Prerequisites:
  * oracle
  * generic-pool 

* npm install orapool

  
# Example

### Basic example

```javascript
var orapool = require('orapool'); // Require the Package

// Oracle Conn Parameters
var oradata = {
  user:'TC', 
  pwd:'<PASSWORD>', 
  tns:'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = 10.3.1.238) (Port = 1525)))(CONNECT_DATA = (SID = TCAP)))'
};
// Pool Parameters
var pooldata = {
  name:'oraclepool',   // name of pool
  min: 0,              // min number of positions
  max: 10,             // max number of positions
  idleTimeoutMillis: 15000, // time before releasing resource and returning it to the pool
  log:true  // writes in console
};
// Pool creation
var pool = orapool.create(oradata, pooldata);
// Pool usage
pool.acquire(function(err, oraconn) {
  if (err) {
    console.log("Error connecting with ORACLE:" + err);
  } else {
    oraconn.execute("SELECT systimestamp FROM dual", [], function(err, results) {<commit_msg>Changing orapool to ora-pool<commit_after># Oracle Pool for Node.js

Taking generic-pool(https://github.com/coopernurse/node-pool) and the oracle driver (https://github.com/joeferner/node-oracle) to create a very basic pool of Oracle connections.

# Basic installation

* Prerequisites:
  * oracle
  * generic-pool 

* npm install ora-pool

  
# Example

### Basic example

```javascript
var orapool = require('ora-pool'); // Require the Package

// Oracle Conn Parameters
var oradata = {
  user:'TC', 
  pwd:'<PASSWORD>', 
  tns:'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = TCP) (Host = 10.3.1.238) (Port = 1525)))(CONNECT_DATA = (SID = TCAP)))'
};
// Pool Parameters
var pooldata = {
  name:'oraclepool',   // name of pool
  min: 0,              // min number of positions
  max: 10,             // max number of positions
  idleTimeoutMillis: 15000, // time before releasing resource and returning it to the pool
  log:true  // writes in console
};
// Pool creation
var pool = orapool.create(oradata, pooldata);
// Pool usage
pool.acquire(function(err, oraconn) {
  if (err) {
    console.log("Error connecting with ORACLE:" + err);
  } else {
    oraconn.execute("SELECT systimestamp FROM dual", [], function(err, results) {
{'fraction_non_alphanumeric': 0.13282808137215796, 'fraction_numerical': 0.015157558835261268, 'mean_word_length': 3.4705882352941178, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1479217', 'n_tokens_mistral': 845, 'n_tokens_neox': 794, 'n_words': 241}