simple-oracledb
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -1,5 +0,30 @@ | ||
'use strict'; | ||
const commons = require('js-project-commons'); | ||
module.exports = commons.lint.eslint.node; | ||
module.exports = { | ||
'env': { | ||
'node': true, | ||
'commonjs': true, | ||
'es2021': true, | ||
'mocha': true | ||
}, | ||
'extends': 'eslint:recommended', | ||
'parserOptions': { | ||
'ecmaVersion': 13 | ||
}, | ||
'rules': { | ||
'indent': [ | ||
'error', | ||
4 | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
'unix' | ||
], | ||
'quotes': [ | ||
'error', | ||
'single' | ||
], | ||
'semi': [ | ||
'error', | ||
'always' | ||
] | ||
} | ||
}; |
| Date | Version | Description | | ||
| ----------- | ------- | ----------- | | ||
| 2021-10-22 | v3.0.0 | Add null binding support, update constants with latest changes and do not break by default after run is done | | ||
| 2020-05-13 | v2.0.0 | Migrate to github actions and upgrade minimal node version | | ||
@@ -4,0 +5,0 @@ | 2019-05-25 | v1.4.2 | Maintenance | |
@@ -88,3 +88,3 @@ 'use strict'; | ||
*/ | ||
clobType: 2006, | ||
clobType: 2017, | ||
/** | ||
@@ -98,3 +98,3 @@ * Holds the BLOB type. | ||
*/ | ||
blobType: 2007, | ||
blobType: 2019, | ||
/** | ||
@@ -108,3 +108,3 @@ * Holds the date type. | ||
*/ | ||
dateType: 2003, | ||
dateType: 2011, | ||
/** | ||
@@ -118,3 +118,3 @@ * Holds the number type. | ||
*/ | ||
numberType: 2002, | ||
numberType: 2010, | ||
/** | ||
@@ -130,2 +130,11 @@ * Holds the string type. | ||
/** | ||
* Holds the object type. | ||
* | ||
* @member {Number} | ||
* @alias Constants.objectType | ||
* @memberof! Constants | ||
* @public | ||
*/ | ||
objectType: 4002, | ||
/** | ||
* Holds the BIND_OUT value. | ||
@@ -132,0 +141,0 @@ * |
@@ -167,4 +167,4 @@ 'use strict'; | ||
* @param {Boolean} [connectionAttributes.ignoreReleaseErrors=false] - If true, errors during connection.release() invoked internally will be ignored | ||
* @param {Object} [connectionAttributes.releaseOptions={force: true}] - The connection.release options (see connection.release for more info) | ||
* @param {Boolean} [connectionAttributes.releaseOptions.force=true] - If force=true the connection.break will be called before trying to release to ensure all running activities are aborted | ||
* @param {Object} [connectionAttributes.releaseOptions={force: false}] - The connection.release options (see connection.release for more info) | ||
* @param {Boolean} [connectionAttributes.releaseOptions.force=false] - If force=true the connection.break will be called before trying to release to ensure all running activities are aborted | ||
* @param {ConnectionAction} action - An action requested to be invoked. | ||
@@ -229,5 +229,2 @@ * @param {AsyncCallback} [callback] - Invoked with an error or the oracle connection instance | ||
const releaseOptions = connectionAttributes.releaseOptions || {}; | ||
if (releaseOptions.force === undefined) { | ||
releaseOptions.force = true; | ||
} | ||
@@ -234,0 +231,0 @@ const simpleOracleDB = require('./simple-oracledb'); |
@@ -205,4 +205,4 @@ 'use strict'; | ||
* @param {Boolean} [options.ignoreReleaseErrors=false] - If true, errors during connection.release() invoked by the pool will be ignored | ||
* @param {Object} [options.releaseOptions={force: true}] - The connection.release options (see connection.release for more info) | ||
* @param {Boolean} [options.releaseOptions.force=true] - If force=true the connection.break will be called before trying to release to ensure all running activities are aborted | ||
* @param {Object} [options.releaseOptions={force: false}] - The connection.release options (see connection.release for more info) | ||
* @param {Boolean} [options.releaseOptions.force=false] - If force=true the connection.break will be called before trying to release to ensure all running activities are aborted | ||
* @param {AsyncCallback} [callback] - Invoked with an error or the result of the action after the connection was released by the pool | ||
@@ -265,5 +265,2 @@ * @returns {Promise} In case of no callback provided in input, this function will return a promise | ||
const releaseOptions = options.releaseOptions || {}; | ||
if (releaseOptions.force === undefined) { | ||
releaseOptions.force = true; | ||
} | ||
@@ -270,0 +267,0 @@ const simpleOracleDB = require('./simple-oracledb'); |
@@ -49,4 +49,2 @@ 'use strict'; | ||
let proxyEventsDone = false; | ||
/** | ||
@@ -214,5 +212,5 @@ * Simple oracledb enables to extend the oracledb main object, oracledb pool and oracledb connection.<br> | ||
if (oracle.createPool) { | ||
OracleDB.extend(oracle); | ||
if (!oracle.simplified) { | ||
OracleDB.extend(oracle); | ||
if (oracle.simplified && (!proxyEventsDone)) { | ||
self.proxyEvents(oracle, [ | ||
@@ -224,4 +222,2 @@ 'pool-created', | ||
]); | ||
proxyEventsDone = true; | ||
} | ||
@@ -228,0 +224,0 @@ } else if (oracle.getConnection) { |
{ | ||
"name": "simple-oracledb", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "Extend capabilities of oracledb with simplified API for quicker development.", | ||
@@ -29,17 +29,13 @@ "author": { | ||
"scripts": { | ||
"test": "grunt test", | ||
"clean": "grunt cleanup", | ||
"lint": "grunt lint", | ||
"docs": "grunt docs", | ||
"format": "grunt format", | ||
"build": "grunt build", | ||
"jstest": "grunt jstest", | ||
"postpublish": "grunt post-publish", | ||
"grunt": "grunt" | ||
"clean": "rm -Rf ./.nyc_output ./coverage", | ||
"format": "js-beautify --config ./.jsbeautifyrc --file ./*.js ./lib/**/*.js ./test/**/*.js", | ||
"lint-js": "eslint ./*.js ./lib/**/*.js ./test/**/*.js", | ||
"lint-css": "stylelint --allow-empty-input ./docs/**/*.css", | ||
"lint": "npm run lint-js && npm run lint-css", | ||
"jstest": "mocha --exit ./test/spec/**/*.js", | ||
"coverage": "nyc --reporter=html --reporter=text --reporter=lcovonly --check-coverage=true mocha --exit ./test/spec/**/*.js", | ||
"docs": "jsdoc2md lib/**/*.js > ./docs/api.md", | ||
"test": "npm run clean && npm run format && npm run lint && npm run docs && npm run coverage", | ||
"postpublish": "git fetch && git pull" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-push": "npm run build" | ||
} | ||
}, | ||
"dependencies": { | ||
@@ -53,9 +49,12 @@ "async": "^3", | ||
"devDependencies": { | ||
"chai": "latest", | ||
"grunt": "latest", | ||
"grunt-cli": "latest", | ||
"husky": "latest", | ||
"js-project-commons": "latest", | ||
"promiscuous": "latest" | ||
"chai": "^4", | ||
"eslint": "^8", | ||
"js-beautify": "^1", | ||
"jsdoc-to-markdown": "^7", | ||
"mocha": "^9", | ||
"nyc": "^15", | ||
"promiscuous": "^0.7", | ||
"stylelint": "^13", | ||
"stylelint-config-standard": "^22" | ||
} | ||
} |
@@ -189,3 +189,3 @@ # simple-oracledb | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -277,3 +277,3 @@ oracledb.run({ | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -320,3 +320,3 @@ oracledb.createPool({ | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -372,3 +372,3 @@ pool.run(function (connection, callback) { | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -429,3 +429,3 @@ pool.parallelQuery([ | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -462,3 +462,3 @@ pool.terminate(); //no callback needed | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -531,3 +531,3 @@ //read all rows and get an array of objects with all data | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -595,3 +595,3 @@ connection.insert('INSERT INTO mylobs (id, clob_column1, blob_column2) VALUES (:id, EMPTY_CLOB(), EMPTY_BLOB())', { //no need to specify the RETURNING clause in the SQL | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -639,3 +639,3 @@ connection.update('UPDATE mylobs SET name = :name, clob_column1 = EMPTY_CLOB(), blob_column2 = EMPTY_BLOB() WHERE id = :id', { //no need to specify the RETURNING clause in the SQL | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -683,3 +683,3 @@ connection.queryJSON('SELECT JSON_DATA FROM APP_CONFIG WHERE ID > :id', [110], function onResults(error, results) { | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -719,3 +719,3 @@ connection.batchInsert('INSERT INTO mylobs (id, clob_column1, blob_column2) VALUES (:id, EMPTY_CLOB(), EMPTY_BLOB())', [ //no need to specify the RETURNING clause in the SQL | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -759,3 +759,3 @@ connection.batchUpdate('UPDATE mylobs SET name = :name, clob_column1 = EMPTY_CLOB(), blob_column2 = EMPTY_BLOB() WHERE id = :id', [ //no need to specify the RETURNING clause in the SQL | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -842,3 +842,3 @@ //run all actions in parallel | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -955,3 +955,3 @@ //run all actions in parallel | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -976,3 +976,3 @@ connection.executeFile('./populate_table.sql', function onResults(error, results) { | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -1025,3 +1025,3 @@ connection.release(); //no callback needed | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -1088,3 +1088,3 @@ connection.rollback(); //no callback needed | ||
**Example** | ||
**Example** | ||
```js | ||
@@ -1165,2 +1165,3 @@ //define a new function for all new connection objects called 'myConnFunc' which accepts 2 arguments | ||
| ----------- | ------- | ----------- | | ||
| 2021-10-22 | v3.0.0 | Add null binding support, update constants with latest changes and do not break by default after run is done | | ||
| 2020-05-13 | v2.0.0 | Migrate to github actions and upgrade minimal node version | | ||
@@ -1167,0 +1168,0 @@ | 2019-05-25 | v1.4.2 | Maintenance | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1202
315264
9
28
4270