ROSODB is a database that uses a combination of SQL and JSON. It is easy to use, making it a great choice for those who need a simple database solution. you may have also known about my other project causedb well, here's it brother, better lighter faster and more secure.
Client: NODE.JS
Server: Node, Express
Install rosodb with npm
npm install rosodb
#Look at the commands
roso --help
#Run it
cause -h any hostname -p any port -username for connection -pa password for connection
#create a file and name it whatever you want and then paste this baseplate code in It,check the api.js docs below for more info.
const api = require('roso-db/api')
const command = {
name: 'create db',
description: 'Create a database',
args: ['databaseName'],
run: async (callback, args) => {
const databaseName = args.databaseName;
if (!api.databaseExists(databaseName)) {
api.createDatabase(databaseName);
callback({
success: true,
});
} else {
callback({
success: false,
error: `Database [${databaseName}] already exists`,
});
}
},
};
api.registerCommand(command);
api.executeCommand('create db', { databaseName: 'users' });
//output
{
success: true,
}
#this command is a prebuilt command in rosodb so you can use it as a reference for your own commands.
drag and drop the extension file to the commands folder wherever the database server is running, and then restart the server commands will automatically be imported.
api.getDatabases();
api.databaseExists(databaseName);
api.createDatabase(databaseName);
api.dropDatabase(databaseName);
api.getTables(databaseName);
api.tableExists(databaseName, tableName);
api.createTable(databaseName, tableName, columns);
api.dropTable(databaseName, tableName);
api.updateTable(databaseName, tableName, rowId, data);
api.selectFromTableById(databaseName, tableName);
api.getRows(databaseName, tableName);
api.selectFromTableByQuery(databaseName, tableName, query);
api.insertIntoTable(databaseName, tableName, row);
Delete a row in a table in a database, only takes id to make sure that you don't delete the wrong row
api.deleteFromTable(databaseName, tableName, id);
api.registerCommand(command);
api.executeCommand(commandName, args);
- SQL Based comamnds
- Fast
- Light
- JSON Storage
Clients for more languages are coming soon.
Decent,better than CauseDB.
First of all its, made to be used on simple projects and client and server hosted on the same device,meaning if you hosted an api in a server the database server would also,be hosted there.
If you have any feedback, please reach out to us at [email protected]