Permalink
Browse files

trying to bring nstore up to date with what tyrant has

  • Loading branch information...
1 parent fd5080c commit f1024c82fe550c65bab175dcebcb5ecd3325f43c @matthewfl matthewfl committed Dec 20, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 db.nstore.js
View
@@ -39,6 +39,19 @@ exports.remove = function (key, callback) {
queue.add("d"+key, callback);
};
+exports.setCat = function (key, value, callback) {
+ exports.get(key, function (d) {
+ exports.set(key, d?d:""+value, callback);
+ });
+};
+
+exports.addInt = function (key, value, callback) {
+ exports.get(key, function (d) {
+ exports.set(key, d*1+value);
+ callback(d*1+value);
+ });
+};
+
exports._isMaster = function () {
master=true;
store = require('./lib/nstore')('./database.db');

0 comments on commit f1024c8

Please sign in to comment.