From 727db01e1861c788276d5006807d33af61c2d9d0 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 12 Feb 2018 22:08:11 -0800 Subject: [PATCH 01/26] Update README to install unixODBC using brew --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7668ffc..9f4b19e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ requirements * unixODBC binaries and development libraries for module compilation * on Ubuntu/Debian `sudo apt-get install unixodbc unixodbc-dev` * on RedHat/CentOS `sudo yum install unixODBC unixODBC-devel` - * on OSX using macports.org `sudo port unixODBC` + * on OSX + * using macports.org `sudo port unixODBC` + * using brew `brew install unixODBC` * odbc drivers for target database * properly configured odbc.ini and odbcinst.ini. From 9db6a691c433de4e7301bf30b73dae5591411c8f Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Wed, 14 Mar 2018 14:57:59 -0400 Subject: [PATCH 02/26] Update nan to latest (v2.9.2) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 353e4b8..752e3a4 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "dependencies": { "bindings": "^1.2.1", - "nan": "^2.0.9" + "nan": "^2.9.2" }, "gypfile": true } From 3ba64cf7fbddad15a504607a1933857472bffbe3 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Wed, 14 Mar 2018 14:58:02 -0400 Subject: [PATCH 03/26] 1.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 752e3a4..4431bd4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.3.0", + "version": "1.3.1", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From d22e09b209622792d63aac66281d1a52f8360071 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Mon, 19 Mar 2018 23:53:24 -0400 Subject: [PATCH 04/26] Add ODBCResult::GetRowCountSync for issue #116 --- src/odbc_result.cpp | 22 +++++++++++++++ src/odbc_result.h | 1 + test/test-queryResultSync-getRowCount.js | 34 ++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 test/test-queryResultSync-getRowCount.js diff --git a/src/odbc_result.cpp b/src/odbc_result.cpp index c71c7a2..9858a45 100644 --- a/src/odbc_result.cpp +++ b/src/odbc_result.cpp @@ -54,6 +54,7 @@ void ODBCResult::Init(v8::Handle exports) { Nan::SetPrototypeMethod(constructor_template, "fetchSync", FetchSync); Nan::SetPrototypeMethod(constructor_template, "fetchAllSync", FetchAllSync); Nan::SetPrototypeMethod(constructor_template, "getColumnNamesSync", GetColumnNamesSync); + Nan::SetPrototypeMethod(constructor_template, "getRowCountSync", GetRowCountSync); // Properties OPTION_FETCH_MODE.Reset(Nan::New("fetchMode").ToLocalChecked()); @@ -750,3 +751,24 @@ NAN_METHOD(ODBCResult::GetColumnNamesSync) { info.GetReturnValue().Set(cols); } + +/* + * GetRowCountSync + */ + +NAN_METHOD(ODBCResult::GetRowCountSync) { + DEBUG_PRINTF("ODBCResult::GetRowCountSync\n"); + Nan::HandleScope scope; + + ODBCResult* self = Nan::ObjectWrap::Unwrap(info.Holder()); + + SQLLEN rowCount = 0; + + SQLRETURN ret = SQLRowCount(self->m_hSTMT, &rowCount); + + if (!SQL_SUCCEEDED(ret)) { + rowCount = 0; + } + + info.GetReturnValue().Set(Nan::New(rowCount)); +} diff --git a/src/odbc_result.h b/src/odbc_result.h index b75778a..f100614 100644 --- a/src/odbc_result.h +++ b/src/odbc_result.h @@ -62,6 +62,7 @@ class ODBCResult : public Nan::ObjectWrap { static NAN_METHOD(FetchSync); static NAN_METHOD(FetchAllSync); static NAN_METHOD(GetColumnNamesSync); + static NAN_METHOD(GetRowCountSync); //property getter/setters static NAN_GETTER(FetchModeGetter); diff --git a/test/test-queryResultSync-getRowCount.js b/test/test-queryResultSync-getRowCount.js new file mode 100644 index 0000000..b6fa2d6 --- /dev/null +++ b/test/test-queryResultSync-getRowCount.js @@ -0,0 +1,34 @@ +var common = require("./common") + , odbc = require("../") + , db = new odbc.Database() + , assert = require("assert") + ; + +db.openSync(common.connectionString); +assert.equal(db.connected, true); + +common.dropTables(db, function () { + common.createTables(db, function (err, data) { + if (err) { + console.log(err); + + return finish(2); + } + + var rs = db.queryResultSync("insert into " + common.tableName + " (colint, coltext) VALUES (100, 'hello world')"); + assert.equal(rs.constructor.name, "ODBCResult"); + + assert.equal(rs.getRowCountSync(), 1); + + common.dropTables(db, function () { + return finish(0); + }); + }); +}); + +function finish(retValue) { + console.log("finish exit value: %s", retValue); + + db.closeSync(); + process.exit(retValue || 0); +} From a4d63edb0ee0a4f0f0b75816f003e5dc90ef74fa Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Tue, 20 Mar 2018 00:06:07 -0400 Subject: [PATCH 05/26] Fix broken ODBCResult::GetColumnNamesSync Needed to do the UNICODE IFDEF around the code that gets the column names. Added a test for this feature as well --- src/odbc_result.cpp | 8 +++++++- test/test-queryResultSync-getColumnNamesSync.js | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/test-queryResultSync-getColumnNamesSync.js diff --git a/src/odbc_result.cpp b/src/odbc_result.cpp index 9858a45..c043ae3 100644 --- a/src/odbc_result.cpp +++ b/src/odbc_result.cpp @@ -745,8 +745,14 @@ NAN_METHOD(ODBCResult::GetColumnNamesSync) { } for (int i = 0; i < self->colCount; i++) { +#ifdef UNICODE cols->Set(Nan::New(i), - Nan::New((const char *) self->columns[i].name).ToLocalChecked()); + Nan::New((uint16_t*) self->columns[i].name).ToLocalChecked()); +#else + cols->Set(Nan::New(i), + Nan::New((char *) self->columns[i].name).ToLocalChecked()); +#endif + } info.GetReturnValue().Set(cols); diff --git a/test/test-queryResultSync-getColumnNamesSync.js b/test/test-queryResultSync-getColumnNamesSync.js new file mode 100644 index 0000000..67d95d9 --- /dev/null +++ b/test/test-queryResultSync-getColumnNamesSync.js @@ -0,0 +1,14 @@ +var common = require("./common") + , odbc = require("../") + , db = new odbc.Database() + , assert = require("assert") + ; + +db.openSync(common.connectionString); +assert.equal(db.connected, true); + +var rs = db.queryResultSync("select 1 as SomeIntField, 'string' as someStringField"); + +assert.deepEqual(rs.getColumnNamesSync(), ['SomeIntField', 'someStringField']); + +db.closeSync(); From 0f4b9c467b5e0d2c4ad7667e4c82b9b714ebf139 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Thu, 22 Mar 2018 12:24:14 -0400 Subject: [PATCH 06/26] 1.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4431bd4..d61a537 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.3.1", + "version": "1.3.2", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From a927a263d00bbcb3e74f175b849f942b12ec65a0 Mon Sep 17 00:00:00 2001 From: Ondrej Patrovic Date: Mon, 2 Apr 2018 14:24:14 -0400 Subject: [PATCH 07/26] Added ODBCConnection::GetInfoSync using SQLGetInfo Synchronous implementation of SQLGetInfo via getInfoSync. Currently only supports SQL_USER_NAME as an argument. Also added SQL_USER_NAME as a constant within ODBC. --- src/odbc.cpp | 1 + src/odbc_connection.cpp | 49 ++++++++++++++++++++++++++++++++++++++++- src/odbc_connection.h | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/odbc.cpp b/src/odbc.cpp index 41d2f11..aecf140 100644 --- a/src/odbc.cpp +++ b/src/odbc.cpp @@ -68,6 +68,7 @@ void ODBC::Init(v8::Handle exports) { constructor_template->Set(Nan::New("SQL_RESET_PARAMS").ToLocalChecked(), Nan::New(SQL_RESET_PARAMS), constant_attributes); constructor_template->Set(Nan::New("SQL_DESTROY").ToLocalChecked(), Nan::New(SQL_DESTROY), constant_attributes); constructor_template->Set(Nan::New("FETCH_ARRAY").ToLocalChecked(), Nan::New(FETCH_ARRAY), constant_attributes); + constructor_template->Set(Nan::New("SQL_USER_NAME").ToLocalChecked(), Nan::New(SQL_USER_NAME), constant_attributes); NODE_ODBC_DEFINE_CONSTANT(constructor_template, FETCH_OBJECT); // Prototype Methods diff --git a/src/odbc_connection.cpp b/src/odbc_connection.cpp index 3faa726..251aa9c 100644 --- a/src/odbc_connection.cpp +++ b/src/odbc_connection.cpp @@ -72,7 +72,9 @@ void ODBCConnection::Init(v8::Handle exports) { Nan::SetPrototypeMethod(constructor_template, "beginTransactionSync", BeginTransactionSync); Nan::SetPrototypeMethod(constructor_template, "endTransaction", EndTransaction); Nan::SetPrototypeMethod(constructor_template, "endTransactionSync", EndTransactionSync); - + + Nan::SetPrototypeMethod(constructor_template, "getInfoSync", GetInfoSync); + Nan::SetPrototypeMethod(constructor_template, "columns", Columns); Nan::SetPrototypeMethod(constructor_template, "tables", Tables); @@ -1143,6 +1145,51 @@ NAN_METHOD(ODBCConnection::QuerySync) { } } + +/* + * GetInfoSync + */ + +NAN_METHOD(ODBCConnection::GetInfoSync) { + DEBUG_PRINTF("ODBCConnection::GetInfoSync\n"); + Nan::HandleScope scope; + + ODBCConnection* conn = Nan::ObjectWrap::Unwrap(info.Holder()); + + if (info.Length() == 1) { + if ( !info[0]->IsNumber() ) { + return Nan::ThrowTypeError("ODBCConnection::GetInfoSync(): Argument 0 must be a Number."); + } + } + else { + return Nan::ThrowTypeError("ODBCConnection::GetInfoSync(): Requires 1 Argument."); + } + + SQLUSMALLINT InfoType = info[0]->NumberValue(); + + switch (InfoType) { + case SQL_USER_NAME: + SQLRETURN ret; + SQLTCHAR userName[255]; + SQLSMALLINT userNameLength; + + ret = SQLGetInfo(conn->m_hDBC, SQL_USER_NAME, userName, sizeof(userName), &userNameLength); + + if (SQL_SUCCEEDED(ret)) { +#ifdef UNICODE + info.GetReturnValue().Set(Nan::New((uint16_t *)userName).ToLocalChecked()); +#else + info.GetReturnValue().Set(Nan::New(userName).ToLocalChecked()); +#endif + } + break; + + default: + return Nan::ThrowTypeError("ODBCConnection::GetInfoSync(): The only supported Argument is SQL_USER_NAME."); + } +} + + /* * Tables */ diff --git a/src/odbc_connection.h b/src/odbc_connection.h index a5131df..5da3441 100644 --- a/src/odbc_connection.h +++ b/src/odbc_connection.h @@ -106,6 +106,7 @@ class ODBCConnection : public Nan::ObjectWrap { static NAN_METHOD(QuerySync); static NAN_METHOD(BeginTransactionSync); static NAN_METHOD(EndTransactionSync); + static NAN_METHOD(GetInfoSync); protected: struct Fetch_Request { From a9d66277146e4a05f1328d1ff2490d2096102d52 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Mon, 2 Apr 2018 15:38:39 -0400 Subject: [PATCH 08/26] Add test for getInfoSync() --- test/common.js | 2 ++ test/config.testConnectionStrings.json | 8 ++++---- test/test-getInfoSync.js | 10 ++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 test/test-getInfoSync.js diff --git a/test/common.js b/test/common.js index 2941e72..552cfae 100644 --- a/test/common.js +++ b/test/common.js @@ -6,6 +6,7 @@ var odbc = require("../"); exports.connectionString = "DRIVER={SQLite3};DATABASE=data/sqlite-test.db"; exports.title = "Sqlite3"; exports.dialect = "sqlite"; +exports.user = ""; if (process.argv.length === 3) { exports.connectionString = process.argv[2]; @@ -39,6 +40,7 @@ if (process.argv.length === 3) { if (connectionString && (connectionString.title == lookup || connectionString.connectionString == lookup)) { exports.connectionString = connectionString.connectionString; exports.dialect = connectionString.dialect; + exports.user = connectionString.user; } }); } diff --git a/test/config.testConnectionStrings.json b/test/config.testConnectionStrings.json index 0e5b716..1954bfa 100644 --- a/test/config.testConnectionStrings.json +++ b/test/config.testConnectionStrings.json @@ -1,6 +1,6 @@ [ - { "title" : "Sqlite3", "connectionString" : "DRIVER={SQLite3};DATABASE=data/sqlite-test.db", "dialect" : "sqlite" } - , { "title" : "MySQL-Local", "connectionString" : "DRIVER={MySQL};DATABASE=test;HOST=localhost;SOCKET=/var/run/mysqld/mysqld.sock;USER=test;", "dialect" : "mysql" } - , { "title" : "MSSQL-FreeTDS-Remote", "connectionString" : "DRIVER={FreeTDS};SERVERNAME=sql2;DATABASE=test;UID=test;PWD=test;AutoTranslate=yes;TEXTSIZE=10000000", "dialect" : "mssql" } - , { "title" : "MSSQL-NativeCLI-Remote", "connectionString" : "DRIVER={SQL Server Native Client 11.0};SERVER=sql2;DATABASE=test;UID=test;PWD=test;", "dialect": "mssql" } + { "title" : "Sqlite3", "connectionString" : "DRIVER={SQLite3};DATABASE=data/sqlite-test.db", "dialect" : "sqlite", "user": "" } + , { "title" : "MySQL-Local", "connectionString" : "DRIVER={MySQL};DATABASE=test;HOST=localhost;SOCKET=/var/run/mysqld/mysqld.sock;USER=test;", "dialect" : "mysql", "user" : "test" } + , { "title" : "MSSQL-FreeTDS-Remote", "connectionString" : "DRIVER={FreeTDS};SERVERNAME=sql2;DATABASE=test;UID=test;PWD=test;AutoTranslate=yes;TEXTSIZE=10000000", "dialect" : "mssql", "user" : "test" } + , { "title" : "MSSQL-NativeCLI-Remote", "connectionString" : "DRIVER={SQL Server Native Client 11.0};SERVER=sql2;DATABASE=test;UID=test;PWD=test;", "dialect": "mssql", "user" : "test" } ] diff --git a/test/test-getInfoSync.js b/test/test-getInfoSync.js new file mode 100644 index 0000000..516d424 --- /dev/null +++ b/test/test-getInfoSync.js @@ -0,0 +1,10 @@ +var common = require("./common") + , odbc = require("../") + , db = new odbc.Database() + , assert = require("assert"); + +db.openSync(common.connectionString); +console.log(common); +var userName = db.conn.getInfoSync(odbc.SQL_USER_NAME); +assert.equal(userName, common.user); + From 3ba2e7372a0d1578b89159d33f0bb3c3dcc393c7 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Mon, 2 Apr 2018 15:39:00 -0400 Subject: [PATCH 09/26] 1.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d61a537..72c1a42 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.3.2", + "version": "1.4.0", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From 2ec659b5cceacf54d783a81d0dadfc63d27c9bca Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 6 Apr 2018 23:07:32 -0400 Subject: [PATCH 10/26] fix: add (const char *) to non-unicode GetInfoSync() case; fixes #118 --- src/odbc_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odbc_connection.cpp b/src/odbc_connection.cpp index 251aa9c..315bb91 100644 --- a/src/odbc_connection.cpp +++ b/src/odbc_connection.cpp @@ -1179,7 +1179,7 @@ NAN_METHOD(ODBCConnection::GetInfoSync) { #ifdef UNICODE info.GetReturnValue().Set(Nan::New((uint16_t *)userName).ToLocalChecked()); #else - info.GetReturnValue().Set(Nan::New(userName).ToLocalChecked()); + info.GetReturnValue().Set(Nan::New((const char *) userName).ToLocalChecked()); #endif } break; From a884bf69dc4931cdcf493946ff0c7a196b7c163e Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 6 Apr 2018 23:07:58 -0400 Subject: [PATCH 11/26] 1.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72c1a42..c59d6ae 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.0", + "version": "1.4.1", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From 6f7206ac6f0d5acfee03ecdb9b22340686a584c7 Mon Sep 17 00:00:00 2001 From: Abdirahim Musse Date: Wed, 9 May 2018 21:23:00 -0500 Subject: [PATCH 12/26] Just adjusted edited a few line to Allow for AIX compiling --- src/odbc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/odbc.cpp b/src/odbc.cpp index aecf140..d46a858 100644 --- a/src/odbc.cpp +++ b/src/odbc.cpp @@ -446,8 +446,10 @@ Handle ODBC::GetColumnValue( SQLHSTMT hStmt, Column column, , tm_wday : 0 , tm_yday : 0 , tm_isdst : 0 + #ifndef _AIX //AIX does not have these , tm_gmtoff : 0 , tm_zone : 0 + #endif }; SQL_TIMESTAMP_STRUCT odbcTime; @@ -483,6 +485,9 @@ Handle ODBC::GetColumnValue( SQLHSTMT hStmt, Column column, return scope.Escape(Nan::New((double(timegm(&timeInfo)) * 1000) + (odbcTime.fraction / 1000000)).ToLocalChecked()); #else +#ifdef _AIX + #define timelocal mktime +#endif return scope.Escape(Nan::New((double(timelocal(&timeInfo)) * 1000) + (odbcTime.fraction / 1000000)).ToLocalChecked()); #endif From ff2502005f73b0f517c21e29c89271f33433366e Mon Sep 17 00:00:00 2001 From: Joshua Pinter Date: Sat, 26 May 2018 23:11:01 -0400 Subject: [PATCH 13/26] Add `.connected` to README. It's a useful method/attribute to call so it should be in the README. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 7668ffc..cc77c4b 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,16 @@ var Database = require("odbc").Database , db = new Database(); ``` +#### .connected + +Returns a Boolean of whether the database is currently connected. + +```javascript +var db = require("odbc")(); + +console.log( "Connected: " + db.connected ); +``` + #### .open(connectionString, callback) Open a connection to a database. From 8e5244b79decac1fc1682eb6248cf5008183ffc7 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 22 Jun 2018 09:47:29 -0400 Subject: [PATCH 14/26] fixes for node v10 --- package.json | 4 ++-- src/odbc.cpp | 10 +++++----- src/odbc_connection.cpp | 9 ++++----- src/odbc_result.cpp | 8 ++++---- src/odbc_statement.cpp | 10 +++++----- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index c59d6ae..21d3ca2 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "test": "cd test && node run-tests.js" }, "dependencies": { - "bindings": "^1.2.1", - "nan": "^2.9.2" + "bindings": "^1.3.0", + "nan": "^2.10.0" }, "gypfile": true } diff --git a/src/odbc.cpp b/src/odbc.cpp index aecf140..6fd59df 100644 --- a/src/odbc.cpp +++ b/src/odbc.cpp @@ -205,7 +205,7 @@ void ODBC::UV_AfterCreateConnection(uv_work_t* req, int status) { info[0] = Nan::New(data->dbo->m_hEnv); info[1] = Nan::New(data->hDBC); - Local js_result = Nan::New(ODBCConnection::constructor)->NewInstance(2, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -252,7 +252,7 @@ NAN_METHOD(ODBC::CreateConnectionSync) { params[0] = Nan::New(dbo->m_hEnv); params[1] = Nan::New(hDBC); - Local js_result = Nan::New(ODBCConnection::constructor)->NewInstance(2, params); + Local js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, params).ToLocalChecked(); info.GetReturnValue().Set(js_result); } @@ -848,11 +848,11 @@ Local ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* // First error is assumed the primary error objError->Set(Nan::New("error").ToLocalChecked(), Nan::New(message).ToLocalChecked()); #ifdef UNICODE - objError->SetPrototype(Exception::Error(Nan::New((uint16_t *)errorMessage).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New((uint16_t *) errorMessage).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New((uint16_t *)errorMessage).ToLocalChecked()); objError->Set(Nan::New("state").ToLocalChecked(), Nan::New((uint16_t *)errorSQLState).ToLocalChecked()); #else - objError->SetPrototype(Exception::Error(Nan::New(errorMessage).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New(errorMessage).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New(errorMessage).ToLocalChecked()); objError->Set(Nan::New("state").ToLocalChecked(), Nan::New(errorSQLState).ToLocalChecked()); #endif @@ -877,7 +877,7 @@ Local ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* if (statusRecCount == 0) { //Create a default error object if there were no diag records objError->Set(Nan::New("error").ToLocalChecked(), Nan::New(message).ToLocalChecked()); - objError->SetPrototype(Exception::Error(Nan::New(message).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New(message).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New( (const char *) "[node-odbc] An error occurred but no diagnostic information was available.").ToLocalChecked()); } diff --git a/src/odbc_connection.cpp b/src/odbc_connection.cpp index 315bb91..3e748ee 100644 --- a/src/odbc_connection.cpp +++ b/src/odbc_connection.cpp @@ -556,7 +556,7 @@ NAN_METHOD(ODBCConnection::CreateStatementSync) { params[1] = Nan::New(conn->m_hDBC); params[2] = Nan::New(hSTMT); - Local js_result(Nan::New(ODBCStatement::constructor)->NewInstance(3, params)); + Local js_result(Nan::NewInstance(Nan::New(ODBCStatement::constructor), 3, params).ToLocalChecked()); info.GetReturnValue().Set(js_result); } @@ -645,12 +645,11 @@ void ODBCConnection::UV_AfterCreateStatement(uv_work_t* req, int status) { info[1] = Nan::New(data->conn->m_hDBC); info[2] = Nan::New(data->hSTMT); - Local js_result = Nan::New(ODBCStatement::constructor)->NewInstance(3, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCStatement::constructor), 3, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; - Nan::TryCatch try_catch; data->cb->Call( 2, info); @@ -890,7 +889,7 @@ void ODBCConnection::UV_AfterQuery(uv_work_t* req, int status) { info[2] = Nan::New(data->hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); // Check now to see if there was an error (as there may be further result sets) if (data->result == SQL_ERROR) { @@ -1139,7 +1138,7 @@ NAN_METHOD(ODBCConnection::QuerySync) { result[2] = Nan::New(hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); info.GetReturnValue().Set(js_result); } diff --git a/src/odbc_result.cpp b/src/odbc_result.cpp index c043ae3..1c1a716 100644 --- a/src/odbc_result.cpp +++ b/src/odbc_result.cpp @@ -185,7 +185,7 @@ NAN_METHOD(ODBCResult::Fetch) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - data->fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + data->fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } else { @@ -338,7 +338,7 @@ NAN_METHOD(ODBCResult::FetchSync) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } @@ -434,7 +434,7 @@ NAN_METHOD(ODBCResult::FetchAll) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - data->fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + data->fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } else { @@ -595,7 +595,7 @@ NAN_METHOD(ODBCResult::FetchAllSync) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } diff --git a/src/odbc_statement.cpp b/src/odbc_statement.cpp index 2447c86..9f92ecc 100644 --- a/src/odbc_statement.cpp +++ b/src/odbc_statement.cpp @@ -216,7 +216,7 @@ void ODBCStatement::UV_AfterExecute(uv_work_t* req, int status) { info[2] = Nan::New(self->m_hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -271,7 +271,7 @@ NAN_METHOD(ODBCStatement::ExecuteSync) { result[2] = Nan::New(stmt->m_hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); info.GetReturnValue().Set(js_result); } @@ -504,7 +504,7 @@ void ODBCStatement::UV_AfterExecuteDirect(uv_work_t* req, int status) { info[2] = Nan::New(self->m_hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -569,8 +569,8 @@ NAN_METHOD(ODBCStatement::ExecuteDirectSync) { result[2] = Nan::New(stmt->m_hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); - + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); + info.GetReturnValue().Set(js_result); } } From 7ea73330f039134c2a6f8b91a0ad67c9a58b2d15 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 22 Jun 2018 09:48:45 -0400 Subject: [PATCH 15/26] 1.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21d3ca2..afe28cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.1", + "version": "1.4.2", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From 24750cc6686b0c8d2d88757f9a2311af53144256 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Tue, 24 Jul 2018 16:23:09 -0400 Subject: [PATCH 16/26] 1.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afe28cb..a9053eb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.2", + "version": "1.4.3", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From 7f88df4844d779727744e1fb5bd5a76c8dbb4b8c Mon Sep 17 00:00:00 2001 From: Abdirahim Musse Date: Wed, 9 May 2018 21:23:00 -0500 Subject: [PATCH 17/26] Just adjusted edited a few line to Allow for AIX compiling --- src/odbc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/odbc.cpp b/src/odbc.cpp index aecf140..d46a858 100644 --- a/src/odbc.cpp +++ b/src/odbc.cpp @@ -446,8 +446,10 @@ Handle ODBC::GetColumnValue( SQLHSTMT hStmt, Column column, , tm_wday : 0 , tm_yday : 0 , tm_isdst : 0 + #ifndef _AIX //AIX does not have these , tm_gmtoff : 0 , tm_zone : 0 + #endif }; SQL_TIMESTAMP_STRUCT odbcTime; @@ -483,6 +485,9 @@ Handle ODBC::GetColumnValue( SQLHSTMT hStmt, Column column, return scope.Escape(Nan::New((double(timegm(&timeInfo)) * 1000) + (odbcTime.fraction / 1000000)).ToLocalChecked()); #else +#ifdef _AIX + #define timelocal mktime +#endif return scope.Escape(Nan::New((double(timelocal(&timeInfo)) * 1000) + (odbcTime.fraction / 1000000)).ToLocalChecked()); #endif From 0525014b24dace497ed1acbb090959c808ce2334 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 22 Jun 2018 09:47:29 -0400 Subject: [PATCH 18/26] fixes for node v10 --- package.json | 4 ++-- src/odbc.cpp | 10 +++++----- src/odbc_connection.cpp | 9 ++++----- src/odbc_result.cpp | 8 ++++---- src/odbc_statement.cpp | 10 +++++----- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index c59d6ae..21d3ca2 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "test": "cd test && node run-tests.js" }, "dependencies": { - "bindings": "^1.2.1", - "nan": "^2.9.2" + "bindings": "^1.3.0", + "nan": "^2.10.0" }, "gypfile": true } diff --git a/src/odbc.cpp b/src/odbc.cpp index d46a858..114b1f4 100644 --- a/src/odbc.cpp +++ b/src/odbc.cpp @@ -205,7 +205,7 @@ void ODBC::UV_AfterCreateConnection(uv_work_t* req, int status) { info[0] = Nan::New(data->dbo->m_hEnv); info[1] = Nan::New(data->hDBC); - Local js_result = Nan::New(ODBCConnection::constructor)->NewInstance(2, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -252,7 +252,7 @@ NAN_METHOD(ODBC::CreateConnectionSync) { params[0] = Nan::New(dbo->m_hEnv); params[1] = Nan::New(hDBC); - Local js_result = Nan::New(ODBCConnection::constructor)->NewInstance(2, params); + Local js_result = Nan::NewInstance(Nan::New(ODBCConnection::constructor), 2, params).ToLocalChecked(); info.GetReturnValue().Set(js_result); } @@ -853,11 +853,11 @@ Local ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* // First error is assumed the primary error objError->Set(Nan::New("error").ToLocalChecked(), Nan::New(message).ToLocalChecked()); #ifdef UNICODE - objError->SetPrototype(Exception::Error(Nan::New((uint16_t *)errorMessage).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New((uint16_t *) errorMessage).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New((uint16_t *)errorMessage).ToLocalChecked()); objError->Set(Nan::New("state").ToLocalChecked(), Nan::New((uint16_t *)errorSQLState).ToLocalChecked()); #else - objError->SetPrototype(Exception::Error(Nan::New(errorMessage).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New(errorMessage).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New(errorMessage).ToLocalChecked()); objError->Set(Nan::New("state").ToLocalChecked(), Nan::New(errorSQLState).ToLocalChecked()); #endif @@ -882,7 +882,7 @@ Local ODBC::GetSQLError (SQLSMALLINT handleType, SQLHANDLE handle, char* if (statusRecCount == 0) { //Create a default error object if there were no diag records objError->Set(Nan::New("error").ToLocalChecked(), Nan::New(message).ToLocalChecked()); - objError->SetPrototype(Exception::Error(Nan::New(message).ToLocalChecked())); + Nan::SetPrototype(objError, Exception::Error(Nan::New(message).ToLocalChecked())); objError->Set(Nan::New("message").ToLocalChecked(), Nan::New( (const char *) "[node-odbc] An error occurred but no diagnostic information was available.").ToLocalChecked()); } diff --git a/src/odbc_connection.cpp b/src/odbc_connection.cpp index 315bb91..3e748ee 100644 --- a/src/odbc_connection.cpp +++ b/src/odbc_connection.cpp @@ -556,7 +556,7 @@ NAN_METHOD(ODBCConnection::CreateStatementSync) { params[1] = Nan::New(conn->m_hDBC); params[2] = Nan::New(hSTMT); - Local js_result(Nan::New(ODBCStatement::constructor)->NewInstance(3, params)); + Local js_result(Nan::NewInstance(Nan::New(ODBCStatement::constructor), 3, params).ToLocalChecked()); info.GetReturnValue().Set(js_result); } @@ -645,12 +645,11 @@ void ODBCConnection::UV_AfterCreateStatement(uv_work_t* req, int status) { info[1] = Nan::New(data->conn->m_hDBC); info[2] = Nan::New(data->hSTMT); - Local js_result = Nan::New(ODBCStatement::constructor)->NewInstance(3, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCStatement::constructor), 3, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; - Nan::TryCatch try_catch; data->cb->Call( 2, info); @@ -890,7 +889,7 @@ void ODBCConnection::UV_AfterQuery(uv_work_t* req, int status) { info[2] = Nan::New(data->hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); // Check now to see if there was an error (as there may be further result sets) if (data->result == SQL_ERROR) { @@ -1139,7 +1138,7 @@ NAN_METHOD(ODBCConnection::QuerySync) { result[2] = Nan::New(hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); info.GetReturnValue().Set(js_result); } diff --git a/src/odbc_result.cpp b/src/odbc_result.cpp index c043ae3..1c1a716 100644 --- a/src/odbc_result.cpp +++ b/src/odbc_result.cpp @@ -185,7 +185,7 @@ NAN_METHOD(ODBCResult::Fetch) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - data->fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + data->fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } else { @@ -338,7 +338,7 @@ NAN_METHOD(ODBCResult::FetchSync) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } @@ -434,7 +434,7 @@ NAN_METHOD(ODBCResult::FetchAll) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - data->fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + data->fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } else { @@ -595,7 +595,7 @@ NAN_METHOD(ODBCResult::FetchAllSync) { Local fetchModeKey = Nan::New(OPTION_FETCH_MODE); if (obj->Has(fetchModeKey) && obj->Get(fetchModeKey)->IsInt32()) { - fetchMode = obj->Get(fetchModeKey)->ToInt32()->Value(); + fetchMode = Nan::To(obj->Get(fetchModeKey)).ToLocalChecked()->Value(); } } diff --git a/src/odbc_statement.cpp b/src/odbc_statement.cpp index 2447c86..9f92ecc 100644 --- a/src/odbc_statement.cpp +++ b/src/odbc_statement.cpp @@ -216,7 +216,7 @@ void ODBCStatement::UV_AfterExecute(uv_work_t* req, int status) { info[2] = Nan::New(self->m_hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -271,7 +271,7 @@ NAN_METHOD(ODBCStatement::ExecuteSync) { result[2] = Nan::New(stmt->m_hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); info.GetReturnValue().Set(js_result); } @@ -504,7 +504,7 @@ void ODBCStatement::UV_AfterExecuteDirect(uv_work_t* req, int status) { info[2] = Nan::New(self->m_hSTMT); info[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, info); + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, info).ToLocalChecked(); info[0] = Nan::Null(); info[1] = js_result; @@ -569,8 +569,8 @@ NAN_METHOD(ODBCStatement::ExecuteDirectSync) { result[2] = Nan::New(stmt->m_hSTMT); result[3] = Nan::New(canFreeHandle); - Local js_result = Nan::New(ODBCResult::constructor)->NewInstance(4, result); - + Local js_result = Nan::NewInstance(Nan::New(ODBCResult::constructor), 4, result).ToLocalChecked(); + info.GetReturnValue().Set(js_result); } } From ca69d383a932644c892e94720be46f524c6d5444 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 22 Jun 2018 09:48:45 -0400 Subject: [PATCH 19/26] 1.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21d3ca2..afe28cb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.1", + "version": "1.4.2", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From 2f90824f70b4a8ab2bee7f91a50f066994947d89 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Tue, 24 Jul 2018 16:23:09 -0400 Subject: [PATCH 20/26] 1.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afe28cb..a9053eb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.2", + "version": "1.4.3", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From a77384683af63c44523835d6387ef827b1afd8d5 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Tue, 24 Jul 2018 16:50:32 -0400 Subject: [PATCH 21/26] 1.4.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9053eb..15647c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.3", + "version": "1.4.4", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From f08680c296b69cbfeabdf5c13b21ba2e04727de0 Mon Sep 17 00:00:00 2001 From: Abdirahim Musse Date: Wed, 25 Jul 2018 09:44:16 -0500 Subject: [PATCH 22/26] Added conditional to npm install correctly when on IBM i --- binding.gyp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/binding.gyp b/binding.gyp index a142ff1..52f55f6 100644 --- a/binding.gyp +++ b/binding.gyp @@ -42,6 +42,18 @@ 'libraries' : [ '-lodbccp32.lib' ] + }], + [ 'OS=="aix"', { + 'variables': { + 'os_name': ' Date: Wed, 25 Jul 2018 12:07:05 -0500 Subject: [PATCH 23/26] Document IBM i install instructions --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 65ff72a..7095b30 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ requirements * on OSX * using macports.org `sudo port unixODBC` * using brew `brew install unixODBC` + * on IBM i `yum install unixODBC unixODBC-devel` (requires [yum](http://ibm.biz/ibmi-rpms)) * odbc drivers for target database * properly configured odbc.ini and odbcinst.ini. From dfa40e3ad307fb2184f9e1264ef66f4e11afbea5 Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Thu, 26 Jul 2018 08:51:04 -0400 Subject: [PATCH 24/26] 1.4.5 --- package-lock.json | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..17417d4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "odbc", + "version": "1.4.5", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha1-s0b27PapX1qBXFg5/HzbIlAvHtc=" + }, + "nan": { + "version": "2.10.0", + "resolved": "https://npm.paviliongift.com/nan/-/nan-2.10.0.tgz", + "integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8=" + } + } +} diff --git a/package.json b/package.json index 15647c0..b001b25 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.4", + "version": "1.4.5", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/", From b21a45f27046ccc6f1d6d0665109424b74b37b92 Mon Sep 17 00:00:00 2001 From: Mark Irish Date: Fri, 5 Apr 2019 14:37:47 -0500 Subject: [PATCH 25/26] Adding files to .gitignore and advertising the v2.0.0-beta.0 release --- .gitignore | 5 ++++- README.md | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e17ea04..24e554c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ a.out build node_modules deps -.idea \ No newline at end of file +.idea +core +.env +.vscode \ No newline at end of file diff --git a/README.md b/README.md index 7095b30..dda7e0d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ +# node-odbc 2.0.0 is now in beta! +A new version of `odbc` has been released in beta! The initial release of this beta can be found at [https://www.npmjs.com/package/odbc/v/2.0.0-beta.0](https://www.npmjs.com/package/odbc/v/2.0.0-beta.0), while later releases can be found under the Versions tab on npm. This URL contains information including the README file outlining the new API. + +To install the beta version, include the `beta` tag with your command: +``` +npm install odbc@beta +``` + +Test it out and give feedback on the issues of the official git repository! + +--- + node-odbc --------- From 6f30c05bb81744fa21e339b9d91f6681794757aa Mon Sep 17 00:00:00 2001 From: Mark Irish Date: Fri, 5 Apr 2019 14:43:15 -0500 Subject: [PATCH 26/26] Updating version number so that it can be npm published --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b001b25..98f8a0b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "odbc", "description": "unixodbc bindings for node", - "version": "1.4.5", + "version": "1.4.6", "main": "lib/odbc.js", "types": "./lib/odbc.d.ts", "homepage": "http://github.com/wankdanker/node-odbc/",