Re: Pure SQLite Implementation in Nodejs?

537 views
Skip to first unread message

mscdex

unread,
Oct 6, 2012, 9:55:46 AM10/6/12
to nodejs
On Oct 6, 3:58 am, mufid <hijacking.mu...@gmail.com> wrote:
> I would want to ask, is there any pure javascript implementation of Sqlite
> in nodejs? I need sqlite library that doesn't need compilation. I ever
> triedhttps://github.com/developmentseed/node-sqlite3but it won't compile
> in my computer.

You'll get better performance with C for sqlite, but here's an
emscripten build of sqlite: http://syntensity.com/static/sql.html

Pavan Kumar Sunkara

unread,
Oct 6, 2012, 12:39:51 PM10/6/12
to nod...@googlegroups.com
You can check out https://github.com/pksunkara/nosqlite

It isn't exactly sqlite3 implementation in javascript but has the basics for it.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en



--
- Pavan Kumar Sunkara

Andrey Gershun

unread,
Nov 20, 2014, 4:30:34 AM11/20/14
to nod...@googlegroups.com
You can try Alasql  (https://github.com/agershun/alasql) - it is pure JavaScript server, which works in browsers and Node.js as well. 

Here is an example, how to use it in Node.js:

    var alasql = require('alasql');

    var db = new alasql.Database();

    db.exec("CREATE TABLE test (one INT, two INT)");
    db.tables.test.data = [   // You can mix SQL and JavaScript
        {one:3,two:4},
        {one:5,two:6},
    ];
    var res = db.exec("SELECT * FROM test ORDER BY two DESC");
    console.log(res[0].one);

Reply all
Reply to author
Forward
0 new messages