• js_sqlite object working patch

    From Ragnarok@ragnarok@bbs.docksud.com.ar to DOVE-Net.Synchronet_Programming_C+,Main.Notices on Tue Apr 10 23:03:36 2007
    hi , i finish a first release of the patch to add js_sqlite object to the synchronet javascript engine.
    i add a DM suggest to exec(query) and return array objects
    i think that now has easy way to get the data
    still lot a more code cleanup and extend the funtionality, its a very alpha version.
    future milestones, i will be add a cursor funcionality, its may be more efficient on large data results.

    But at moment, you can use a simple sql engine to your modules! =)
    more info:
    http://bbs.docksud.com.ar/~ragnarok/sync/js_sqlite/

    code sample:
    var db; //database
    var ret; //return object array
    var row; //row object

    db = new Sqlite("/tmp/base1");
    //db.debug = true;
    db.open();
    if (ret = db.exec("select user,name from your_table")) {
    for (row in ret) {
    writeln (ret[row].user + "/" + ret[row].name);
    }
    }
    else {
    writeln ("ops: " + db.errormsg);
    }
    db.close();

    Saludos!

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar