Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "odbc", | ||
"description": "unixodbc bindings for node", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"homepage": "http://github.com/markdirish/node-odbc/", | ||
@@ -40,7 +40,7 @@ "main": "./lib/odbc.js", | ||
"dependencies": { | ||
"node-addon-api": "^1.3.0" | ||
"async": "^3.0.1", | ||
"node-addon-api": "^1.7.1" | ||
}, | ||
"gypfile": true, | ||
"devDependencies": { | ||
"async": "^3.0.1", | ||
"dotenv": "^6.2.0", | ||
@@ -47,0 +47,0 @@ "eslint": "^5.13.0", |
node-odbc | ||
--------- | ||
An asynchronous/synchronous interface for node.js to unixODBC and its supported | ||
drivers. | ||
An asynchronous interface for Node.js to unixODBC and its supported drivers. | ||
@@ -29,3 +28,3 @@ requirements | ||
Instructions on how to set up your ODBC environment can be found in the SETUP.md. As an overview, three main steps must be done before `node-odbc` can interact with your database: | ||
Three main steps must be done before `node-odbc` can interact with your database: | ||
@@ -39,3 +38,5 @@ * **Install unixODBC and unixODBC-devel:** Compilation of `node-odbc` on your system requires these packages to provide the correct headers. | ||
* **IBM i:** `yum install unixODBC unixODBC-devel` (requires [yum](http://ibm.biz/ibmi-rpms)) | ||
* **Install ODBC drivers for target database:** Most database management system providers offer ODBC drivers for their product. See the website of your DBMS for more information. | ||
* **odbc.ini and odbcinst.ini**: These files define your DSNs (data source names) and ODBC drivers, respectively. They must be set up for ODBC functions to correctly interact with your database. | ||
@@ -50,2 +51,6 @@ | ||
## Drivers | ||
--- | ||
## Important Changes in 2.0 | ||
@@ -63,2 +68,4 @@ | ||
* **Timestamp and Datetime Changes:** SQL_DATETIME and SQL_TIMESTAMP no longer are automatically converted to UTC from how they were stored in the table. Previously, the assumption was that whatever was stored in the table was in "local time", and then converted to UTC. There is no guarantee that the time stored is in "local time", and many DBMSs store times without timezone data. Now, the driver will determine how to format the timestamps and datetimes that are returned, as it is retrieved simply as a String with no additional manipulation by this package. | ||
--- | ||
@@ -256,4 +263,5 @@ | ||
const connection = await odbc.connect(`${process.env.CONNECTION_STRING}`); | ||
const statement = await connection.createStatement(); | ||
// now have a statement where sql can be prepared, bound, and executed | ||
const result = await connection.callProcedure(null, null, 'MY_PROC', [undefined]); | ||
// result contains an array of results, and has a `parameters` property to access parameters returned by the procedure. | ||
console.log(result); | ||
} | ||
@@ -798,3 +806,3 @@ | ||
const statement = await connection.createStatement(); | ||
await statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)'); | ||
await statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)'); | ||
// statement has been prepared, can bind and execute | ||
@@ -814,3 +822,3 @@ } | ||
if (error1) { return; } // handle | ||
statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
if (error2) { return; } // handle | ||
@@ -845,3 +853,3 @@ // statement has been prepared, can bind and execute | ||
const statement = await connection.createStatement(); | ||
await statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)'); | ||
await statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)'); | ||
// Assuming MY_TABLE has INTEGER and VARCHAR fields. | ||
@@ -897,3 +905,3 @@ await statement.bind([1, 'Name']); | ||
const statement = await connection.createStatement(); | ||
await statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)'); | ||
await statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)'); | ||
// Assuming MY_TABLE has INTEGER and VARCHAR fields. | ||
@@ -917,3 +925,3 @@ await statement.bind([1, 'Name']); | ||
if (error1) { return; } // handle | ||
statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
if (error2) { return; } // handle | ||
@@ -954,3 +962,3 @@ // Assuming MY_TABLE has INTEGER and VARCHAR fields. | ||
const statement = await connection.createStatement(); | ||
await statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)'); | ||
await statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)'); | ||
// Assuming MY_TABLE has INTEGER and VARCHAR fields. | ||
@@ -974,3 +982,3 @@ await statement.bind([1, 'Name']); | ||
if (error1) { return; } // handle | ||
statement.prepare('INSTERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
statement.prepare('INSERT INTO MY_TABLE VALUES(?, ?)' (error2) => { | ||
if (error2) { return; } // handle | ||
@@ -977,0 +985,0 @@ // Assuming MY_TABLE has INTEGER and VARCHAR fields. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
201762
5
1021
1
2
+ Addedasync@^3.0.1
+ Addedasync@3.2.6(transitive)
Updatednode-addon-api@^1.7.1