Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Improved initialization

Compare
Choose a tag to compare
@mike-eason mike-eason released this 04 Mar 10:09
· 30 commits to master since this release

New Initialisation Functions

Instead of providing the connection type, the module now exposes three functions:

const db = require('oledb');

let oledb = db.oledbConnection(connectionString);
let odbc = db.odbcConnection(connectionString);
let sql = db.sqlConnection(connectionString);

Then each connection exposes the same functions as before, execute, scalar, and query.

Updating Your Code

This is a breaking change from v1.3.0. All previous initialisation of the module must be changed. Here is an example:

OLD

const db = oledb(connectionString, 'sql');

NEW

const db = oledb.sqlConnection(connectionString);