Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

binlog-triggers-mysql

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

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.)

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by55.56%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 04 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc