Registry / database / mysql-connector-plugdo-js

mysql-connector-plugdo-js

JSON →
library1.0.0jsnpmunverified

A MySQL database connector for Plugdo Node.js framework (version 1.0.0). This package provides a simple integration layer allowing Plugdo applications to connect and interact with MySQL databases using Plugdo's connector architecture. It is designed specifically for the Plugdo ecosystem and has limited usage outside of that context. The package appears to be at an initial release with no clear update cadence or community adoption. Key differentiators: tightly coupled with Plugdo framework, minimal API surface.

npm install mysql-connector-plugdo-js
INSTALL
IMPORT
SIG · MYSQL-CONNECTOR-PL
M
mysql-connector-plugdo-js
databasejavascriptv1.0.0
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.

mysql
const myDatabaseConnector = require('mysql-connector-plugdo-js/mysql');
import mysql from 'mysql-connector-plugdo-js';
The package uses CommonJS and exposes a function via a nested path. Default import will not work.
mysql()
plugdo.registerConnector('db', 'mysql', myDatabaseConnector.mysql());
plugdo.registerConnector('db', 'mysql', myDatabaseConnector);
The mysql property is a function that must be invoked to get the connector instance.
plugdo
const plugdo = require('plugdo-node'); plugdo.registerConnector('db', 'mysql', myDatabaseConnector.mysql());
import plugdo from 'plugdo-node';
Plugdo-node is a CommonJS package; use require.

Registers a MySQL connector with Plugdo framework and configures a data source with environment variables.

const myDatabaseConnector = require('mysql-connector-plugdo-js/mysql'); const plugdo = require('plugdo-node'); plugdo.registerConnector('db', 'mysql', myDatabaseConnector.mysql()); // Now you can use the connector in your Plugdo application plugdo.dataSource('db', 'mysql', () => { return { host: process.env.MYSQL_HOST ?? 'localhost', user: process.env.MYSQL_USER ?? 'root', password: process.env.MYSQL_PASSWORD ?? '', database: process.env.MYSQL_DATABASE ?? 'test' }; });
Debug
Known issues
gotchaPackage is tied to Plugdo framework; it will not work without plugdo-node installed and configured.
fix
Ensure plugdo-node is installed: npm install plugdo-node
affects: >=0.0
gotchaThe package path requires a trailing /mysql to import the correct module.
fix
Use require('mysql-connector-plugdo-js/mysql') not require('mysql-connector-plugdo-js')
affects: >=1.0.0
gotchaThe mysql() function returns a connector object, not a function. Must be called once during registration.
fix
Call myDatabaseConnector.mysql() with parentheses when registering.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mysql-connector-plugdo-js/mysql'
Missing package or incorrect path.
fix
Run npm install mysql-connector-plugdo-js
TypeError: myDatabaseConnector.mysql is not a function
Incorrect import of the module; possibly imported the main index instead of /mysql path.
fix
Use require('mysql-connector-plugdo-js/mysql') to get the object with mysql() method.
Error: RegisterConnector expects a function, but got object
Passing the result of mysql() instead of the function itself.
fix
Pass the function reference: plugdo.registerConnector('db', 'mysql', myDatabaseConnector.mysql) (without parentheses).
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mysql-connector-plugdo-js — npm install mysql-connector-plugdo-js · libregistry