Registry / database / clientlinker-flow-mysql

clientlinker-flow-mysql

JSON →
library6.1.4jsnpmunverified

Mysql flow plugin for clientlinker, version 6.1.4. It provides a MySQL database integration for the clientlinker framework, allowing clients to execute SQL queries via predefined handlers. Released as needed, this package is part of the clientlinker ecosystem and focuses on MySQL-specific flow handling. It differentiates by offering a configuration-driven approach to SQL execution with support for sub-keys and inline SQL.

npm install clientlinker-flow-mysql
INSTALL
IMPORT
SIG · CLIENTLINKER-FLOW-
C
clientlinker-flow-mysql
databasejavascriptv6.1.4
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.

clientlinker-flow-mysql
const flow = require('clientlinker-flow-mysql');
import flow from 'clientlinker-flow-mysql';
This package is CommonJS only and does not export named symbols; use require to load the flow plugin.

Shows how to configure and use a MySQL client flow within clientlinker, including loading the flow and executing SQL handlers.

const clientlinker = require('clientlinker'); const linker = clientlinker({ flows: ['mysql'], clients: { mysqlCustomClient: { mysqlConfigFile: '/etc/dbconfig.conf', mysqlConfigKey: 'DBItemName', mysqlhandler: { clientHanlder: { sql: 'SELECT `name` FROM `db_example` WHERE `id`= ?', keys: ['id'], }, subKeys: { sql: 'INSERT INTO `db_example` (`name`, `value`) VALUES ?', keys: ['info'], subKeys: { info: ['name', 'value'] } } } } } }); linker.loadFlow('mysql', 'clientlinker-flow-mysql', module); linker.run('mysqlCustomClient.clientHanlder', null, { id: 13 }) .then(function() {}); linker.run('mysqlCustomClient.subKeys', null, { info: { name: 1, value: 2 } }); linker.run('mysqlCustomClient.subKeys', null, { info: [ { name: 1, value: 2 }, { name: 2, value: 2 } ] });
Debug
Known issues
gotchaThe mysqlConfigFile and mysqlConfigKey options require a properly formatted configuration file; otherwise the flow will fail silently.
fix
Ensure the configuration file exists and the key matches an entry in the file.
affects: <=6.1.4
gotchaThe sql property uses ? placeholders for parameter substitution; failure to match number of keys to placeholders will cause runtime errors.
fix
Ensure the keys array length matches the number of ? placeholders in the sql string.
affects: <=6.1.4
breakingVersion 6.x changed the way subKeys are processed; the old format using nested arrays is no longer supported.
fix
Use the subKeys object with array values for column mapping.
affects: >=6.0.0
Errors
Common errors & fixes
Error: Cannot find module 'clientlinker-flow-mysql'
The package is not installed or the require path is incorrect.
fix
Install the package: npm install clientlinker-flow-mysql
TypeError: linker.loadFlow is not a function
The clientlinker instance is not initialized properly or loadFlow is called on a wrong object.
fix
Ensure you create a clientlinker instance with valid options and then call loadFlow on that instance.
Upgrade
Version history
6.1.4latest on npm
Audit
Dependencies
clientlinkerrequiredRequired peer dependency; the flow plugin depends on clientlinker core to register flows and run clients.
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
clientlinker-flow-mysql — npm install clientlinker-flow-mysql · libregistry