Skip to content

r3posit-db is a lightweight Node.js module that uses SQLite3 to manage data in a single file. It offers a simple, synchronous API for basic CRUD operations, making it ideal for small projects and rapid development. With r3posit-db, you can efficiently handle your data without the complexity of larger database systems.

Notifications You must be signed in to change notification settings

R3posit/Reposit-Database-NPM-Module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

reposit.db is a lightweight and simple Node.js module for managing key-value pairs using a single SQLite database file. With reposit.db, you can easily add, get, update, and delete records without dealing with multiple files or complex database configurations.

Installation To install reposit.db, run the following command: npm install reposit.db Here's a quick guide on how to use reposit.db:

Require and Initialize

const R3posit = require('reposit.db');
const reposit = new R3posit('mytest.db'); // You can specify the database file name

#Add Data

reposit.add('key', 'value');
const value = reposit.get('key');
console.log(`Value: ${value}`);

Update Data

reposit.update('key', 'new value');

Delete Data

reposit.delete('key');

Close Database

reposit.close();

API

add(key, value): Adds a new record to the database or updates the existing one.
get(key): Retrieves the value associated with the specified key. Returns null if the key does not exist.
update(key, value): Updates the value of an existing record.
delete(key): Deletes the record associated with the specified key.
close(): Closes the database connection.

License

reposit.db is licensed under the ISC License. See the LICENSE file for more details.

About

r3posit-db is a lightweight Node.js module that uses SQLite3 to manage data in a single file. It offers a simple, synchronous API for basic CRUD operations, making it ideal for small projects and rapid development. With r3posit-db, you can efficiently handle your data without the complexity of larger database systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published