mysql-live-select icon indicating copy to clipboard operation
mysql-live-select copied to clipboard

Library still supported?

Open Bosskee opened this issue 5 years ago • 2 comments

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 avatar May 08 '19 20:05 Bosskee

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

Bosskee avatar May 08 '19 20:05 Bosskee

try using mysql2

npm install mysql2 --save

n8ores avatar Oct 07 '20 09:10 n8ores