0.3.4 • Published 6 months ago

go-mysql-js v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

go-mysql-js

A library wrapping the go-mysql package, providing a MySQL client connector and binlog parsing implementation.

Installation

npm i --save go-mysql-js

Example

import MysqlBinlog from 'go-mysql-js';

async function main() {
    let syncer = await MysqlBinlog.create({
        hostname: "localhost",
        port: 3306,
        username: "root",
        password: "mypassword",
        tableRegexes: ['Users'],
    });
    syncer.on('event', (event) => {
        console.log('got row event', event);
    });
    syncer.on('error', (err) => {
        console.error('got error', err);
    });

    process.on('SIGINT', function() {
        console.log("Caught interrupt signal");
        syncer.close();
    });
}

main().catch(err => {
    console.error(err);
    process.exit(1);
});
0.3.4

6 months ago

0.3.3

6 months ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago