npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

adonis-adodb

v1.0.2

Published

The adonisjs adodb package provide some function to read/write data to Access/Excel file base on node-adodb package.

Readme

Adonis-adodb

Adonis-ADODB package provide some features to work with ADODB on Windows.

js-standard-style

:pray: This repository is base on node-adodb and only work on Windows, install Microsoft ACE OLEDB 12.0

This package support some feature for:

  • Access file (.mdb, .accdb): connect, select, insert, update, delete data.
  • Excel file (.xls, .xlsx): connect and select data.

Node/OS Target

This repo/branch is supposed to run fine on Windows 7/8/8.1/10 platforms and targets Node.js >=8.10

Installation:

npm install adonis-adodb

Configuration:

Add following row to start/app.js file in your project at providers array:

const providers = [
  // ...
  'adonis-adodb/providers/AdonisADODBServiceProvider'
]

Usage:

This package provide Reader and Writer class to read and write data from file.

Reader

Read Data: Use readDataFromTable(tableName, conditions) function:

const ADODBReader = use('ADODBReader')
//...
async read (filePath) {
    let reader = null
    if (filePath.endsWith('.mdb') || filePath.endsWith('.accdb')) {
        reader = ADODBReader.createReader()
        await reader.connect(filePath)
    } else if (filePath.endsWith('.xls') || filePath.endsWith('.xlsx')) {
        reader = ADODBReader.createReader('MSExcel')
        await reader.connect(filePath)
    }
    // Read data
    let data = await reader.readDataFromTable('customers', {
        $select: ['code', 'name'], // Array| Object -> Sql: SELECT code,name FROM customers.
        $filters: [ // Array or Object
            {
                $or: [
                    {name: {$like: 'Customer'}}, // name LIKE '%Customer%'
                    {code: {$dislike: '2%'}} // code NOT LIKE '2%'
                ]
            }, // sql clause: (name LIKE '%Customer%' OR code NOT LIKE '2%')
            {status: {$eq: 1}} // supported operator:$eq, $ne, $like, $in, $nin, $gt, $gte, $lt, $lte, $dislike, 
        ], // sql: WHERE status = '1' AND (name LIKE '%Customer%' OR code NOT LIKE '2%')
        $sort: { // Array|Object
            code: 'desc' // 1/-1 /'asc' / 'desc'
        } // Sql clause: // ORDER BY code DESC
    })
    // SqL query: SELECT code,name FROM customers WHERE status = '1' AND (name LIKE '%Customer%' 
    // OR code NOT LIKE '2%') ORDER BY code DESC
    
}

Count data in table: Use count (tableName, conditions) function:

    let data = reader.count('products', {
        status: {$eq: 1} // support same $filters property in conditions parameter of readDataFromTable function.
    })

Writer

Create - Update, Delete data by Writer

const ADODBWriter = use('ADODBWriter')
// ...
async changeData () {
    let writer = null
    if (filePath.endsWith('.mdb') || filePath.endsWith('.accdb')) {
        writer = ADODBWriter.createWriter()
        await writer.connect(filePath)
    } else if (filePath.endsWith('.xls') || filePath.endsWith('.xlsx')) { // Not support update / delete on Excel file.
        writer = ADODBWriter.createWriter('MSExcel')
        await writer.connect(filePath)
    }
    
    // Insert data
    if (writer) {
        await writer.insert('products', [
            {
                code: '0001',
                name: 'Product 1',
                status: 1
            },
            {
                code: '0002',
                name: 'Product 2',
                status: 0
            }
        ]) // INSERT INTO products (code, name, status) VALUES (('0001', 'Product 1', '1'), ('0002', 'Product 2', '0'))
        
        // Update data (only support Access file.
        await writer.update('products', {
            status: 1 // update status 0 -> 1
        }, {
            code: '0002' with product has code = '0002'
        }) // UPDATE products SET status = 1 WHERE code = '0002'
        
        // Delete data (Only support Access file.
        await writer.delete('products', {code: '0001'}) // DELETE FROM products WHERE code = '0001'
    }
}