
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
@wxn0brp/db
Advanced tools
A simple file-based database management system with support for CRUD operations, custom queries, and graph structures.
A lightweight file-based database management system that supports CRUD operations, custom queries, and graph structures.
To install the package, run:
npm install @wxn0brp/db
You can import the necessary classes from the package as follows:
import { Valthera, Graph, ValtheraRemote, GraphRemote, Relation, genId, ValtheraMemory, ValtheraAutoCreate } from "@wxn0brp/db";
import { Valthera } from '@wxn0brp/db';
// Create a new Valthera database instance
const db = new Valthera('./database');
// Add a new document to the database
const result = await db.add('users', { name: 'John Doe', age: 30 });
console.log(result); // { _id: 'xxx', name: 'John Doe', age: 30 }
// Find all documents in the collection
const results = await db.find('users', {});
console.log(results); // [{ _id: 'xxx', name: 'John Doe', age: 30 }]
// Find a single document in the collection.
const user = await db.findOne('users', { $gt: { age: 25 } });
console.log(user); // { _id: 'xxx', name: 'John Doe', age: 30 }
// Update a document in the collection
const updateResult = await db.updateOne('users', { name: 'John Doe' }, { age: 31 });
console.log(updateResult); // true
// Remove a document from the collection
const removeResult = await db.removeOne('users', { name: 'John Doe' });
console.log(removeResult); // true
Website: https://wxn0brp.github.io/ValtheraDB/
For detailed information, refer to the following resources:
This project is released under the MIT License.
Contributions are welcome! Please submit a pull request or open an issue on our GitHub repository.
FAQs
A simple file-based database management system with support for CRUD operations, custom queries, and graph structures.
We found that @wxn0brp/db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.