Registry / database / berry-database

berry-database

JSON →
library1.3.4jsnpmunverified

berryDB is a lightweight, file-based relational database tool for Node.js, version 1.3.4. It aims to provide a simple and secure storage solution using a Key Word Storage (KWS) philosophy. Compared to full-featured databases like SQLite or LevelDB, berryDB is minimal and intended for small-scale applications. Release cadence is irregular; the package has seen limited updates and community adoption.

npm install berry-database
INSTALL
IMPORT
SIG · BERRY-DATABASE
B
berry-database
databasejavascriptv1.3.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

berry
const berry = require('berry-database');
import berry from 'berry-database';
The library does not ship ES modules; use CommonJS require() as shown in the documentation.
berry-tool CLI
berry -c db mydb
berry-database -c db mydb
The CLI tool is a separate npm package 'berry-tool', not part of 'berry-database'.
Database creation
berry -c db mydb
Database must be created via command-line tool before using the library.

Demonstrates basic CRUD operations after creating a database and table via CLI.

const berry = require('berry-database'); // Example: creating a new database (via CLI, not shown here) // Then, you can use the library to interact with it. // Assuming the tool has been used to create a database named 'testdb' and a table 'users' // Opening the database const db = new berry.Database('testdb'); // Inserting a record const result = db.insert('users', { name: 'Alice', age: 30 }); console.log('Inserted ID:', result.id); // Querying records const users = db.select('users', { name: 'Alice' }); console.log('Users:', users); // Updating a record db.update('users', { age: 31 }, { name: 'Alice' }); // Deleting a record db.delete('users', { name: 'Alice' }); console.log('Done.');
Debug
Known issues
gotchaThe library requires a separate CLI tool 'berry-tool' to create databases and tables. Without it, you cannot create new databases programmatically.
fix
Install berry-tool globally: npm install -g berry-tool, then use CLI commands to set up the database structure.
affects: >=1.0.0
gotchaThe API exposes methods like 'insert', 'select', 'update', 'delete' but the documentation is sparse and may not match actual behavior. The library may have limited error handling.
fix
Test operations thoroughly; check the source code on GitHub for accurate method signatures.
affects: >=1.0.0
deprecatedThe library appears to be in maintenance mode with infrequent updates. Newer Node.js versions may cause compatibility issues.
fix
Consider using a more actively maintained database library like SQLite (better-sqlite3) or LevelDB.
affects: >=1.3.0
gotchaNo types or TypeScript definitions are provided, making integration with TypeScript projects cumbersome.
fix
Create your own definition file or use '// @ts-ignore' when importing.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'berry-database'
The package is not installed in the current directory.
fix
Run 'npm install berry-database' to install the package.
Error: ENOENT: no such file or directory, open './data/db.json'
The database directory does not exist; you must create the database using the CLI tool first.
fix
Install berry-tool and run 'berry -c db yourdbname' to create the database.
TypeError: db.insert is not a function
The 'Database' class may not have been instantiated correctly, or the API has changed.
fix
Ensure you have created the database via CLI and that the library version supports that method. Check the source.
Dependency not found: berry-tool
The berry-tool package is not installed globally.
fix
Run 'npm install -g berry-tool' to install the command-line tool.
Upgrade
Version history
1.3.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
berry-database — npm install berry-database · libregistry