1.3.0 • Published 6 years ago

database-js-sqlite v1.3.0

Weekly downloads
39
License
MIT
Repository
github
Last release
6 years ago

database-js-sqlite

Build Status

SQLite wrapper for database-js

About

Database-js-mysql is a wrapper around the node-sqlite3 package. It is intended to be used with the database-js package.

Usage

var Database = require('database-js2').Connection;

(async () => {
    let connection, statement, rows;
    connection = new Database('sqlite:///test.sqlite');
    
    try {
        statement = await connection.prepareStatement("SELECT * FROM tablea WHERE user_name = ?");
        rows = await statement.query('not_so_secret_user');
        console.log(rows);
    } catch (error) {
        console.log(error);
    } finally {
        await connection.close();
    }
})();

sql.js

The original sql.js package can still be used as well. Pass "driver=sql.js" in the connection parameter string. e.g.

connection = new Database('sqlite:///test.sqlite?driver=sql.js');
1.3.0

6 years ago

1.2.4

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago