Query to delete data from a table in SQL:
-------Delete data of jobs table-------
DELETE FROM Jobs WHERE Category = "Banking";
dbAPI for
CouchDB usage:
var dbAPI = require('./dbAPI-server').dbAPI;
dbAPI(input, function (output) {
//Handle output
});
with the
input:
input = {
"metadata": {
"dbinfo": {
"DBMS": "couchdb",
"cFile": "../dbAPI-server/config/dbinfo.couchdb.json"
}
},
"data": {
"format": "text",
"szSQL": "DELETE FROM Jobs WHERE Category = 'Banking';"
}
}
To execute the SQL create query in other DBMS, change the
"DBMS" name from
couchdb to
neo4j, redis, mysql or
sqlite. Then change the
cFile to corresponding DBMS configuration file.
Support features:
Neo4j: not support
ORDER BY & LIMIT in Delete query.Redis: supported by
rediSQL module