From 29d16221e9e12b18efc1d4a146ef098c34beaffc Mon Sep 17 00:00:00 2001 From: Megastef Date: Tue, 9 Nov 2021 13:30:35 +0100 Subject: [PATCH 1/5] Update Readme.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75ff775..12cfb4e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,10 @@ Then, on the next page you need to download two packages Then unpack both archives content together into one dir. Then create subdirs /network/admin and put there your tnsnames.ors file. -Windows users should then add this dir to PATH system variable +Windows users might have to set +- PATH to the folder with sqlplus executable +- ORACLE_HOME to your Oracle folder +- TNS_ADMIN to the folder containing tnsnames.ora file \* - i.e. Windows users have to install MS Visual Studio in order to get oracledb work @@ -26,5 +29,7 @@ sqlplus(sql, connProps, function(err, rows){ else { console.log(rows) } -}); + }, + false, // optional parameter: debug=false (default) activates debug messages on console + 5000); // optional parameter: timeout=10000 (default) for sqlplus process in milliseconds ``` From 28ec226c283349e18cb77f04dd6ffe722b6be5d7 Mon Sep 17 00:00:00 2001 From: Megastef Date: Tue, 9 Nov 2021 13:32:11 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12cfb4e..c6ee98d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Then, on the next page you need to download two packages - Instant Client Package - SQL*Plus Then unpack both archives content together into one dir. -Then create subdirs /network/admin and put there your tnsnames.ors file. +Then create subdirs /network/admin and put there your tnsnames.ora file. Windows users might have to set - PATH to the folder with sqlplus executable - ORACLE_HOME to your Oracle folder From 5e27b056b03fd8db9dcc5fa8ea1aade69255a21b Mon Sep 17 00:00:00 2001 From: Megastef Date: Tue, 4 Jan 2022 13:40:24 +0100 Subject: [PATCH 3/5] Update dependencies in package.json --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6c20800..c3d503f 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "author": "mankey-ru", "license": "ISC", "dependencies": { - "csv-parse": "~1.2.0", - "fix-path": "^2.1.0", - "tmp": "~0.1.0" + "csv-parse": "~5.0.4", + "fix-path": "^4.0.0", + "tmp": "~0.2.1" } } From fa2c51432748557038d009c6f8dc64cabfa2dc6c Mon Sep 17 00:00:00 2001 From: Megastef Date: Tue, 4 Jan 2022 13:41:31 +0100 Subject: [PATCH 4/5] Update require statement for latest csv-parse version --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4458ddb..987b9e2 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ const spawn = require('child_process').spawn -const csvparse = require('csv-parse') +const csvparse = require('csv-parse').parse const isWin = process.platform === 'win32' const isMac = process.platform === 'darwin' const isLinux = process.platform === 'linux' From 6de5a2d74d1e0e398eceabe6e26b2c7bf9cc4100 Mon Sep 17 00:00:00 2001 From: Megastef Date: Fri, 7 Jan 2022 17:10:29 +0100 Subject: [PATCH 5/5] add relax_column_count:true for CSV parser option --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 987b9e2..861192e 100644 --- a/index.js +++ b/index.js @@ -96,6 +96,7 @@ module.exports = function (sql, connProps, callback, bDebug, maxTimeout) { const colNamesArray = output.split(/\r\n?|\n/, 2)[1].split('"').join('').split(',') const csvparseOpt = { columns: colNamesArray, + relax_column_count: true, skip_lines_with_empty_values: true, from: 2 // first line is blank, second is headings }