Home

WakandaDB is an Open Source Model-driven NoSQL database engine with a comprehensive REST web interface. The database schema, server-side processing, and querying are all done in JavaScript.

Define a Data Model in JSON or JavaScript

model = new DataStoreCatalog(); var Person = model.addClass(“Person”, “People”); Person.addAttribute(“firstName”,”storage”,”string”); Person.addAttribute(“lastName” ,”storage”,”string”); Person.addAttribute(“name”, “calculated”, “string”); Person.name.onGet = function() { return this.firstName + ‘ ‘ + this.lastName; } Person.addAttribute(“company”, “relatedEntity”, “Company”, “Companies”);

via JSON

{ name: "Company", className: "Company", collectionName: "Companies", scope: "public", attributes:[ { name: "ID", autosequence: true, kind: "storage", primKey: true, scope: "public", type: "long", unique: true },{ name: "name", kind: "storage", scope: "public", type: "string" },{ kind: "relatedEntities", name: "employees", reversePath: true, path: "company", scope: "public", type: "Person" }] }

Examples of Integrating

Generic “Ajax”

Wakanda provides a universal Ajax driver able to provide a proxy of the model in any browser. It is composed of a “data provider” and a “data source“. The data provider is useful to provide data binding to any raw JavaScript application or to any existing Ajax Framework. The data source layer provides a “Publish/Subscribe” mechanism (aka Observer) for any element using them (widgets, other datasources, …) 

Ajax Query

var vcount; var myset = ds.Person.query("ID > 100 and ID < 300", { // we pass a function that receives the server response onSuccess: function(event) { vcount = event.entityCollection.length; // we retrieve the size of the entity collection $("#display").html("selection : "+vcount); // display the size of the entity collection in the container whose ID is "display" } });

This entry was posted in Main. Bookmark the permalink.