gopherdata
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -110,2 +110,5 @@ /***************************************************************** | ||
//dbResponse-------------------------------------------------------------------- | ||
var dbColumnsReturned; | ||
var dbRowsReturned; | ||
var dbCharsReturned; | ||
function SetDbResponse(){ | ||
@@ -115,3 +118,3 @@ if(transactionObject.error){ | ||
}else{ | ||
if (dbResponse.rows.length > 0) { | ||
if (dbResponse.rows) { | ||
if (transactionObject.outputFormat === 'json') { | ||
@@ -121,2 +124,5 @@ return JSON.stringify(dbResponse.rows); | ||
}else{ | ||
dbColumnsReturned = 0; | ||
dbRowsReturned = 0; | ||
dbCharsReturned = 0; | ||
return transactionObject.zeroRowMessage; | ||
@@ -126,6 +132,4 @@ } | ||
}; | ||
var dbColumnsReturned; | ||
var dbRowsReturned; | ||
var dbCharsReturned; | ||
if(transactionObject.error){ | ||
if(transactionObject.error || !dbResponse.rows){ | ||
dbColumnsReturned = 0; | ||
@@ -146,9 +150,12 @@ dbRowsReturned = 0; | ||
var columnHeaders = []; | ||
if(!transactionObject.error){ | ||
for (var i = 0; i<dbResponse.metaData.length; i++){ | ||
if (dbResponse.metaData[i].name) {columnHeaders.push(dbResponse.metaData[i].name);} | ||
} | ||
if(!transactionObject.error && dbResponse.rows){ | ||
for (var i = 0; i<dbResponse.metaData.length; i++){ | ||
if (dbResponse.metaData[i].name) {columnHeaders.push(dbResponse.metaData[i].name);} | ||
} | ||
} | ||
Object.assign(metaData,{"columnHeaders":columnHeaders}); | ||
if(transactionObject.error){Object.assign(metaData,{"characters":0})}else{Object.assign(metaData,{"characters":(JSON.stringify(dbResponse.rows).length)-2})}; | ||
if(transactionObject.error || !dbResponse.rows){ | ||
Object.assign(metaData,{"characters":0}) } | ||
else{ | ||
Object.assign(metaData,{"characters":(JSON.stringify(dbResponse.rows).length)-2}) }; | ||
for (var key in transactionObject) { | ||
@@ -184,3 +191,3 @@ if (transactionObject.hasOwnProperty(key)) { | ||
}else{ | ||
error = {"message" : 'No Error'}; | ||
error = false; | ||
} | ||
@@ -192,3 +199,3 @@ | ||
"host":host, | ||
"network":network, | ||
//"network":network, | ||
"connection":connection, | ||
@@ -211,3 +218,3 @@ "dbStatement":dbStatement, | ||
if (transactionObject.responseOutput[i] === "host"){Object.assign(gopherResponse,{"host":host});} | ||
if (transactionObject.responseOutput[i] === "network"){Object.assign(gopherResponse,{"network":network});} | ||
//if (transactionObject.responseOutput[i] === "network"){Object.assign(gopherResponse,{"network":network});} | ||
if (transactionObject.responseOutput[i] === "connection"){Object.assign(gopherResponse,{"connection":connection});} | ||
@@ -214,0 +221,0 @@ if (transactionObject.responseOutput[i] === "error"){Object.assign(gopherResponse,{"error":error});} |
@@ -130,3 +130,3 @@ /***************************************************************** | ||
//-----------QUERY PROTOTYPE------------------ | ||
Gopher.prototype.query = function (transactionPlan,callback){ | ||
Gopher.prototype.runStatement = function (transactionPlan,callback){ | ||
@@ -133,0 +133,0 @@ let setProperties = this.setProperties; |
{ | ||
"name": "gopherdata", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Develop, Maintain, Organize, and Send your recycled database statements from outside of an Oracle Database. Develop and execute canned or dynamic DDL/DML statements that are stored within library files (in json format) executed from a Node.js configured environment against an Oracle backend.", | ||
@@ -14,2 +14,5 @@ "author": { | ||
}, | ||
"scripts": { | ||
"test": "mocha" | ||
}, | ||
"license": "MIT", | ||
@@ -16,0 +19,0 @@ "keywords": ["data", "database", "Db", "DB", "db", "layer", "node", "warehouse", "information","transaction", "metrics", "connect", "connection", "connectivity", "business", "mine", "mining","SQL", "PLSQL", "PL/SQL", "select", "insert", "statements", "query", "queries", "querying", "clauses", "ETL", "client", "add-on","API", "web-API", "webAPI", "plugin", "plug-in", "tool", "driver", "library", "module", "oracledb", "oracle-gopher", "oracle","ora", "OCI", "10g", "11g","12c"], |
@@ -16,4 +16,4 @@ # gopher | ||
## Requirements | ||
* Node.js (works with v0.10.28 through v6.2.2) | ||
* Oracle Instant Client (works with v11.2 through v12.1) | ||
* Node.js (tested with v0.10.28 through v6.9.1) | ||
* Oracle Instant Client (tested with v11.2 through v12.1) | ||
@@ -20,0 +20,0 @@ ## Contents |
Sorry, the diff of this file is not supported yet
105856
14
1516