Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library still supported? #30

Open
Bosskee opened this issue May 8, 2019 · 2 comments
Open

Library still supported? #30

Bosskee opened this issue May 8, 2019 · 2 comments

Comments

@Bosskee
Copy link

Bosskee commented May 8, 2019

Hello, I'm trying to use mysql-live-select but I get this warning when laucnhing:

(node:27144) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Plea
se use clearTimeout instead.

This is my code:

const LiveSelect = require('mysql-live-select');
const dbSettings = require('./config');
const liveDb = new LiveSelect(dbSettings);

liveDb.select(function(esc, escId){
  return (
    'select * from livetable'
  );
}, [ {
  table: 'livetable',
} ]).on('update', function(diff, data){
  // diff contains an object describing the difference since the previous update
  // data contains an array of rows of the new result set
  console.log(data);
});
@Bosskee
Copy link
Author

Bosskee commented May 8, 2019

It successfully selects the rows when launching the server, but it doesn't see mto detect when changes occur after that.

@n8ores
Copy link

n8ores commented Oct 7, 2020

try using mysql2

npm install mysql2 --save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants