Instantiation (FuelDB fuelDB) FuelDB(object options)

var fueldb = new FuelDB({uri:"localhost:8101",ssl:false,user:"admin",password:"admin"});

Instantiation allow you to create and initialize a handler to manage a connection with the database. You can open multiple connection to the same or other database. The connection is open during the instanciation.

Connecting connect(object options)


Open the connection to the database. If a connection is already open, it just close and reopen it.

Disconnecting disconnect()


Close the connection to the database

Subscription (string idSub) subscribe(string point, function callback, function error)

var idSub = fueldb.subscribe("", function(obj){
	console.log("Old value: "+obj.old.value+" Date: ";
	console.log("New value: "+obj.value+" Date: ";
	// ...

Subscription allow you to listen to a data point in the database, the callback function will be called as soon as a new entry for the data point parameter will be saved.

Unsubscribing unsubscribe(string point, string idSub)

fueldb.unsubscribe("", idSub);

This method cancel a subscription. If idSub is not provided, all the subscriptions for the point will be canceled.

Writing write(string point, object value)

fueldb.write("", {"age":23,"name":"John"});

Write a value in a data point. It can be a string, a number or a JSON object.

Reading read(string point, function callback, function error)"", function(obj){
	console.log("Value: "+obj.value+" Date: ";

Read a value in a data point. It can be a string, a number or a JSON object.

Removing remove(string point, function error)


Remove a data point.

Browsing browse(string point, function callback, function error)

fueldb.browse("", function(points){
	console.log("Points: "+points.join(" ,"));
	// ...

Browse a data point to find all the sub data points.