Search code examples
mysqlnode.jssocketssails.jsnode-streams

How to stream data to a sails socket from a sail waterline model?


I'm following the simple example given in the Sails documentation

// Start the stream.  Pipe it to sockets.
User.stream({name:'Walter'}).pipe(req.socket.emit);

I hit this error

TypeError: dest.on is not a function
    at Stream.pipe

Any idea what might be happening?


Solution

  • I am using sails-mysql-transactions as the adapter. Currently this does not support the .stream() method.