Registry / database / ravel-mysql-provider

ravel-mysql-provider

JSON →
library1.0.0-rc.3jsnpmunverified

A DatabaseProvider for the Ravel application framework that wraps the mysql npm package to provide MySQL connection pooling and transaction support. Current stable version is 0.2.0 (1.0.0-rc.3 is a release candidate). It integrates with Ravel's dependency injection and module system, allowing named multiple database pools. Development appears stalled with no recent releases; use is limited to Ravel applications and requires matching peer dependency versions.

npm install ravel-mysql-provider
INSTALL
IMPORT
SIG · RAVEL-MYSQL-PROVID
R
ravel-mysql-provider
databasejavascriptv1.0.0-rc.3
harness data pending
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.

default
const MySQLProvider = require('ravel-mysql-provider')
import MySQLProvider from 'ravel-mysql-provider'
Package uses CommonJS, no default export for ESM.
MySQLProvider
const { MySQLProvider } = require('ravel-mysql-provider')
const MySQLProvider = require('ravel-mysql-provider').MySQLProvider
Named export works but default export is more common.

Shows how to register the MySQLProvider with a Ravel app and configure via .ravelrc.

const app = new require('ravel')(); const MySQLProvider = require('ravel-mysql-provider'); app.registerProvider(MySQLProvider); // In .ravelrc: // { "mysql options": { "host": "localhost", "port": 3306, "user": "root", "password": null, "database": "mydb" } } app.scan('./modules'); app.scan('./resources'); app.start();
Debug
Known issues
breakingThis package is incompatible with Ravel versions outside the peer dependency range (>= 1.0.0-rc.1 < 1.0.0).
fix
Use a Ravel version within the specified range.
affects: >=1.0.0-rc.1
deprecatedThe underlying mysql package is in maintenance mode and does not support modern async/await patterns.
fix
Consider using mysql2 or another actively maintained driver.
affects: >=0.0.0
gotchaConfiguration keys must match exactly: 'mysql options' (with space) as shown in examples.
fix
Use 'mysql options' in .ravelrc, not 'mysql_options' or 'mysql-options'.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'ravel'
Ravel is not installed as a peer dependency.
fix
Run npm install ravel@>=1.0.0-rc.1 <1.0.0
Error: Configuration parameter 'mysql options' is required
Missing or incorrectly named configuration in .ravelrc or app.set().
fix
Add 'mysql options' object with required fields to .ravelrc.
Upgrade
Version history
1.0.0-rc.3latest on npm
Audit
Dependencies
ravelrequiredpeer dependency required to use the provider
mysqlrequiredunderlying MySQL driver for query execution
Agent activity
10 hits · last 30 days
node
8
Meta
1
Resources
ravel-mysql-provider — npm install ravel-mysql-provider · libregistry