VultrexDB
A simple SQLite/MongoDB database wrapper designed for novices – developed with ♥ by Stasium#0001, Host#0001 and chroventer#5269. Documentation by Host#0001 and chroventer#5269.
Installation
npm i vultrex/vultrexdb
Providers
VultrexDB supports "providers" to support persistent databases. Supports providers are MonogDB and SQLite.
Install one of the following providers of your choice:
# SQLite npm i sqlite sqlite3 # MongoDB npm i mongodb
Example usage
const VultrexDB = ; // One of the following:const db = provider: 'sqlite' table: 'mytable' fileName: 'database';const db = provider: 'mongodb' url: 'myMongoURI' collection: 'mycollection'; await db; // this is mandatory // Set Values on Keys in Databaseawait db; // Return an Array of Objects containing the Keys and Values from the Databaseconsole; // Return an Array of Objects containing the Keys and Values from the Database which includes the characters "fo" in the keyconsole; // Return the Value of a Key from the Database - if this fails, you can return a optional Default Valueconsole; // Delete a Key from the Databaseawait db; // Delete all Keys from the Databaseawait dbclear; // Return a Number of Keys in the Databaseconsole;