0.0.99 • Published 8 years ago
flat.js v0.0.99
#Flat.js - Flat data store for node.
##Example Usage:
var flat = require("flat.js");
var db = flat("./template.json", {persist: true});
//TODO: write unit tests
info.log("Database doesn't seem to exist, making it.", "warning", info.getLineNumber(), __filename);
db.openAsync("utf8", function(e) {
this.createTable("Users");
//Create a field called "user1" in the table "Users", populate it with an object
this.createField("Users", "user1", {
name: "Geoff",
age: 69
});
//Overwrite the object stored at "user1" with a new one
this.set("Users", "user1", {
name: "Harry",
age: 100
});
//Need to set a specific property on a stored object? (TODO: modify set function to accomdate this)
//For now do this:
this.store[db.name]["Users"]["user1"].age = 20;
this.setModified(true);
this.delete("Users");
});
License
MIT
0.0.99
8 years ago
0.0.98
8 years ago
0.0.97
8 years ago
0.0.96
8 years ago
0.0.95
8 years ago
0.0.94
8 years ago
0.0.93
8 years ago
0.0.92
9 years ago
0.0.91
9 years ago
0.0.9
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago
0.0.0
9 years ago
1.0.0
9 years ago