Registry / database / clay-driver-mysql

clay-driver-mysql

JSON →
library5.2.42jsnpmunverified

MysqlDriver is the MySQL adapter for ClayDB, an ORM-like database abstraction layer. This package provides a driver class extending SequelizeDriver, enabling MySQL integration with ClayDB. Version 5.2.42 is stable and compatible with Node.js >=7.6 and npm >=4. The driver supports connection pooling, logging, and benchmark options. Key differentiators: it is part of the ClayDB ecosystem, providing a unified interface across different databases. The package is mature and used in production environments, though development activity appears low.

npm install clay-driver-mysql
INSTALL
IMPORT
SIG · CLAY-DRIVER-MYSQL
C
clay-driver-mysql
databasejavascriptv5.2.42
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.

MysqlDriver
const { MysqlDriver } = require('clay-driver-mysql')
const MysqlDriver = require('clay-driver-mysql')
MysqlDriver is a named export, not the default export.
create
const { create } = require('clay-driver-mysql')
const create = require('clay-driver-mysql').create
create is a named export function.
MysqlDriver
import { MysqlDriver } from 'clay-driver-mysql'
import MysqlDriver from 'clay-driver-mysql'
ESM import must use named import brackets; default import is not available.

Instantiates a MySQL driver and creates a ClayDB lump instance to perform database operations.

const { MysqlDriver } = require('clay-driver-mysql') const clayLump = require('clay-lump') const driver = new MysqlDriver('my_database', 'user', 'password', { host: 'localhost', dialect: 'mysql', logging: false, benchmark: false }) const lump = clayLump({ driver: driver, // other ClayLump options }) /* Use the lump object for database operations */ console.log('ClayDB lump created with MySQL driver')
Debug
Known issues
gotchaConstructor parameters are in order: database, username, password, options – not an options object with nested credentials.
fix
Use new MysqlDriver(database, username, password, options).
affects: >=5.0.0
deprecatedThe 'logging' option can be a boolean or function; passing true may produce excessive output in production.
fix
Set logging to false or a custom function in production.
affects: >=5.0.0
gotchaRequires clay-lump to be installed separately; clay-driver-mysql is only the driver, not the full ORM.
fix
Install clay-lump as a dependency.
affects: >=5.0.0
gotchaEngine requirement Node >=7.6; older Node versions will fail to install or run.
fix
Upgrade Node.js to >=7.6.
affects: >=5.0.0
Errors
Common errors & fixes
Cannot find module 'clay-driver-mysql'
Package not installed or typo in import/require path.
fix
Run 'npm install clay-driver-mysql' and verify the path is correct.
TypeError: clay_lump is not a function
clay-lump is not imported correctly or not installed.
fix
Install clay-lump via 'npm install clay-lump' and require it correctly: const clayLump = require('clay-lump').
MysqlDriver is not a constructor
Using default import instead of named import.
fix
Use const { MysqlDriver } = require('clay-driver-mysql') instead of const MysqlDriver = require('clay-driver-mysql').
Upgrade
Version history
5.2.42latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
OpenAI (training)
1
Resources
clay-driver-mysql — npm install clay-driver-mysql · libregistry