Socket
Socket
Sign inDemoInstall

binlog-triggers-mysql

Package Overview
Dependencies
16
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    binlog-triggers-mysql

This library provides API for listening to binlog events. Events can be filtered by table name and/or operation type (insert, delete etc.)


Version published
Weekly downloads
13
increased by550%
Maintainers
1
Install size
2.36 MB
Created
Weekly downloads
 

Readme

Source

API for listening to MySQL binlog events.

Overview

This library provides API for listening to binlog events. Events can be filtered by table name and/or operation type (insert, delete etc.)

Usage example

import {BinlogTriggers, DbConfig} from "binlog-triggers-mysql"

const binlogTriggers = new BinlogTriggers()

binlogTriggers.table("test", {
  insert: (rows) => {
    console.log("Got new rows", rows)
    countRows++
  }
})

binlogTriggers.start({
  database: "binlog_demo",
  host: "localhost",
  password: "test",
  user: "test",
  port: 3306,
})

Implementation details

To parse MySQL binlog messages, it uses https://github.com/nevill/zongji .

In addition to API binlog-triggers-mysql also provides MySQL reconnect. It is useful on network issues or MySQL server restarts.

Keywords

FAQs

Last updated on 04 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc