
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
mysql-dialect-with-deadlock
Advanced tools
A custom MySQL dialect for [Kysely](https://kysely.dev/) that automatically retries queries when they encounter deadlock errors.
A custom MySQL dialect for Kysely that automatically retries queries when they encounter deadlock errors.
npm install mysql-dialect-with-deadlock
# or
pnpm add mysql-dialect-with-deadlock
import { Kysely } from 'kysely'
import { createPool } from 'mysql2'
import { MySQLDialectWithDeadlockRetries } from 'mysql-dialect-with-deadlock'
const db = new Kysely({
dialect: new MySQLDialectWithDeadlockRetries({
pool: createPool({
host: 'localhost',
user: 'root',
database: 'test'
}),
deadlock: {
maxAttempts: 3,
onRetry: (error, attempt) => {
console.log(`Retry attempt ${attempt} after deadlock: ${error.message}`)
}
}
})
})
Option | Type | Default | Description |
---|---|---|---|
maxAttempts | number | 3 | Maximum number of retry attempts |
delay | number | 0 | Delay in ms between retries |
backoff | boolean | false | Use exponential backoff for delays |
onRetry | function | undefined | Callback function called on each retry |
MIT
FAQs
A custom MySQL dialect for [Kysely](https://kysely.dev/) that automatically retries queries when they encounter deadlock errors.
The npm package mysql-dialect-with-deadlock receives a total of 184 weekly downloads. As such, mysql-dialect-with-deadlock popularity was classified as not popular.
We found that mysql-dialect-with-deadlock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.