Coder Social home page Coder Social logo

ganquan0910 / node-sqlcipher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from delaballe/node-sqlcipher

0.0 1.0 0.0 10.22 MB

SQLcipher binding for NodeJS

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.18% PLpgSQL 44.41% JavaScript 7.47% Python 0.11% C 40.19% Batchfile 0.13% C++ 7.48% HTML 0.03%

node-sqlcipher's Introduction

NAME

node-sqlicipher - Asynchronous, non-blocking SQLite3 + SQLcipher bindings for Node.js 0.2-0.4 (versions 2.0.x), 0.6.13+, 0.8.x, and 0.10.x (versions 2.1.x). it's a fork of node-sqlite3 with sqlcipher library

USAGE

var sqlite3 = require('sqlcipher').verbose();
var db = new sqlite3.Database('test.db', 'password');

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();

This is in early stage but it works !!

Currently you need to have libsqlcipher.so.0.8.6 compiled and installed in your system library path !!

Will be fixed soon

node-sqlcipher's People

Watchers

 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.