Registry / database / firenze-adapter-mysql

firenze-adapter-mysql

JSON →
library0.4.0jsnpmunverified

MySQL adapter for the firenze.js ORM (v0.4.0), released in 2016. Provides a bridge between firenze's query builder and MySQL using a pool-based connection management. Last updated on npm in 2016, no active maintenance. Differentiates as a thin adapter for firenze's fluent API, but the firenze ORM itself is in maintenance mode. Requires firenze peer dependency.

database
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Package uses CommonJS, not ESM. Default export is the adapter class.

const MysqlAdapter = require('firenze-adapter-mysql');

Named export does not exist; must use default import.

const { default: MysqlAdapter } = require('firenze-adapter-mysql');

fireze is also CJS; common to use destructuring from require.

const Database = require('firenze').Database;

Creates a MySQL database connection using firenze's Database class with the mysql adapter, configured via environment variables.

const f = require('firenze'); const Database = f.Database; const MysqlAdapter = require('firenze-adapter-mysql'); const db = new Database({ adapter: MysqlAdapter, host: process.env.DB_HOST || '127.0.0.1', port: process.env.DB_PORT || 3306, database: process.env.DB_NAME || 'my_database', user: process.env.DB_USER || 'root', password: process.env.DB_PASSWORD || '', pool: { min: 0, max: 1 } }); // Example query db.model('User').find().then(users => { console.log(users); }).catch(err => { console.error(err); });
Debug
Known footguns
deprecatedfirenze-adapter-mysql is no longer actively maintained; last release in 2016.
gotchaPackage uses mysql npm package (v2) under the hood, which has known security issues and lacks prepared statement support.
breakingConstructor expects 'adapter' property set to the adapter class (not instance), different from some other database libraries.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
mj12bot
1
ahrefsbot
1
Resources