Data Manipulation

In order to manipulate data there have to be write rules defined in the database configuration file and data has to be sent as objects in array. Sending one row in JSON means sending [{id:1,foo:2}], not just {id:1, foo:2}. Several rows at a time can be sent as well.

The way data is handled depends on write rules. Every row that is sent generates either an "insert", "update" or "delete" command. A row can be ignored if there is no matching write rule. In case of a matching "error" message for at least one row or in case of a database error no data manipulation occurs.

It’s possible to return data on the fly (see section on returning row). Select, where and join query rules can be applied for feedback. The returned row will always be in the same format as the incoming data (defined as table extension in URL query - currently only JSON is supported).

All sent data is serialized in HTTP POST. Data needs to be stringified and you cannot send any other POST variables with the same request.


Submit JSON data via POST using JavaScript:

var data = [{"IDpresident":1,"comment":"The first President"}];
var rpc = new XMLHttpRequest();'POST','comments.json');