Giter Site home page Giter Site logo

node-sqlite3's Introduction

NAME

node-sqlite3 - Asynchronous, non-blocking SQLite3 bindings for node.js 0.2-0.4 (versions 2.0.x), 0.6.13+ and 0.8.x (versions 2.1.x).

USAGE

Install with npm install sqlite3.

var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database(':memory:');

db.serialize(function() {
  db.run("CREATE TABLE lorem (info TEXT)");

  var stmt = db.prepare("INSERT INTO lorem VALUES (?)");
  for (var i = 0; i < 10; i++) {
      stmt.run("Ipsum " + i);
  }
  stmt.finalize();

  db.each("SELECT rowid AS id, info FROM lorem", function(err, row) {
      console.log(row.id + ": " + row.info);
  });
});

db.close();

FEATURES

API

See the API documentation in the wiki.

BUILDING

Make sure you have the sources for sqlite3 installed. Mac OS X ships with these by default. If you don't have them installed, install the -dev package with your package manager, e.g. apt-get install libsqlite3-dev for Debian/Ubuntu. Make sure that you have at least libsqlite3 >= 3.6.

Bulding also requires node-gyp to be installed. You can do this with npm:

npm install -g node-gyp

To obtain and build the bindings:

git clone git://github.com/developmentseed/node-sqlite3.git
cd node-sqlite3
./configure
make

You can also use npm to download and install them:

npm install sqlite3

TESTS

expresso is required to run unit tests.

npm install expresso
make test

CONTRIBUTORS

ACKNOWLEDGEMENTS

Thanks to Orlando Vazquez, Eric Fredricksen and Ryan Dahl for their SQLite bindings for node, and to mraleph on Freenode's #v8 for answering questions.

Development of this module is sponsored by Development Seed.

LICENSE

node-sqlite3 is BSD licensed.

node-sqlite3's People

Contributors

audriusk avatar carter-thaxton avatar dpaleino avatar grumdrig avatar hermannpencole avatar kkaefer avatar mrjjwright avatar orlandov avatar ry avatar tootallnate avatar wrynearson avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.