ezseed-database
raw JSON → 1.0.6 verified Sat Apr 25 auth: no javascript abandoned
Ezseed database handler for the ezseed BitTorrent seedbox platform. Provides database abstraction and query building for tracking torrents, users, and settings. Version 1.0.6 is the latest stable release. The package uses a migration-based schema and supports SQLite and MySQL. Key differentiators include integration with the ezseed ecosystem and a simple, unopinionated API. Release cadence is sporadic; latest version is from 2015 and the project appears unmaintained.
Common errors
error Error: Cannot find module 'ezseed-database' ↓
cause Package not installed or not in node_modules.
fix
Run 'npm install ezseed-database' or add to package.json.
error Error: Cannot find module 'mysql' (or 'sqlite3') ↓
cause Optional database driver not installed.
fix
Install the required driver: 'npm install mysql' or 'npm install sqlite3'.
error TypeError: Database is not a constructor ↓
cause Using default import incorrectly as named import.
fix
Use 'const Database = require('ezseed-database')' not 'import { Database } from ...'.
Warnings
gotcha The 'client' option uses string-based driver names; 'mysql' and 'sqlite3' are the only supported values. Typo causes silent fallback to SQLite? ↓
fix Ensure 'client' is exactly 'mysql' or 'sqlite3'.
deprecated The 'paths.getAll' was renamed to 'paths.get' in v0.1.1. Old method may still exist but is deprecated. ↓
fix Replace paths.getAll with paths.get or check version and use appropriate method.
breaking License changed from MIT to GPL3 in v0.1.2, affecting downstream usage and redistribution. ↓
fix Review GPL3 compliance; if needed, use prior version under MIT.
gotcha The package expects a pre-existing database structure? Migrations run only on init() and may fail if tables exist with incompatible schema. ↓
fix Ensure database is empty or match migration expectations, or handle migration errors.
Install
npm install ezseed-database yarn add ezseed-database pnpm add ezseed-database Imports
- default wrong
const Database = require('ezseed-database')correctimport Database from 'ezseed-database' - Database wrong
import { Database } from 'ezseed-database'correctconst Database = require('ezseed-database') - connect wrong
import connect from 'ezseed-database/connect'correctconst { connect } = require('ezseed-database')
Quickstart
const Database = require('ezseed-database');
const db = new Database({
client: 'sqlite3',
connection: {
filename: './ezseed.db'
}
});
// Initialize tables based on migrations
db.init().then(() => {
console.log('Database ready');
}).catch(err => console.error(err));
// Insert a torrent
db.insert('torrents', {
info_hash: 'abc123',
name: 'ubuntu.iso',
size: 12345678
}).then(console.log).catch(console.error);