Registry / database / ftaskrunner-mysql

ftaskrunner-mysql

JSON →
library1.0.5jsnpmunverified

FTaskRunner-MySql provides fluent MySQL tasks for the FTaskRunner task execution library. Version 1.0.5 is the latest, released as an initial stable version. It enables building MySQL queries and operations as composable tasks within the FTaskRunner pipeline. Key differentiators include a fluent API for defining MySQL tasks, integration with FTaskRunner's sync/async execution, and support for Node.js. The package is minimal and focuses on database operations, with no additional dependencies beyond FTaskRunner and a MySQL driver. Release cadence is low; this is a niche library for users of FTaskRunner.

npm install ftaskrunner-mysql
INSTALL
IMPORT
SIG · FTASKRUNNER-MYSQL
F
ftaskrunner-mysql
databasejavascriptv1.0.5
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.

MySqlTask
import { MySqlTask } from 'ftaskrunner-mysql'
const MySqlTask = require('ftaskrunner-mysql').MySqlTask
Use ESM imports for consistency with FTaskRunner ecosystem.
MySqlConnectionConfig
import { MySqlConnectionConfig } from 'ftaskrunner-mysql'
TypeScript interface for connection config.
createMySqlTask
import { createMySqlTask } from 'ftaskrunner-mysql'
import createMySqlTask from 'ftaskrunner-mysql'
This is a named export, not a default export.

Creates a MySQL task with connection config, runs a simple SELECT query, and adds it to an FTaskRunner pipeline.

import { MySqlTask } from 'ftaskrunner-mysql'; import { Runner } from 'ftaskrunner'; const runner = new Runner(); const mysqlTask = new MySqlTask({ host: process.env.MYSQL_HOST ?? 'localhost', user: process.env.MYSQL_USER ?? 'root', password: process.env.MYSQL_PASSWORD ?? '', database: process.env.MYSQL_DB ?? 'test' }); mysqlTask.query('SELECT 1 AS result', []) .then(rows => console.log(rows)) .catch(err => console.error(err)); runner.add(mysqlTask); runner.run();
Debug
Known issues
breakingVersion 1.0.0 changed MySqlTask constructor signature; now requires an object instead of separate parameters.
fix
Update constructor call to use config object.
affects: <1.0.0
deprecatedThe 'mysql' driver is no longer supported; use 'mysql2' instead.
fix
Install mysql2 and ensure it is available.
affects: >=0.0.0
gotchaDo not call MySqlTask methods after adding to Runner without a new instance; internal state may be reused.
fix
Create a new MySqlTask for each independent query pipeline.
affects: >=1.0.0
gotchaConnection configuration must be provided at construction; it cannot be changed later.
fix
Ensure all config is passed in the constructor.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'mysql2'
mysql2 is a required peer dependency but not installed.
fix
Run 'npm install mysql2' in your project.
TypeError: MySqlTask is not a constructor
Using wrong import or outdated version where export was different.
fix
Use 'import { MySqlTask } from 'ftaskrunner-mysql'' and ensure version >= 1.0.0.
ER_ACCESS_DENIED_ERROR: Access denied for user
Invalid MySQL credentials in connection config.
fix
Check MYSQL_USER, MYSQL_PASSWORD environment variables or constructor arguments.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
ftaskrunnerrequiredcore task execution framework
mysql2requiredMySQL database driver for queries
Agent activity
5 hits · last 30 days
node
4
Resources
ftaskrunner-mysql — npm install ftaskrunner-mysql · libregistry