numtel / meteor-mysql

Reactive MySQL for Meteor
MIT License
343 stars 41 forks source link

using numtel:mysql - object does not recognize 'select' #72

Open ShravaniRoy opened 8 years ago

ShravaniRoy commented 8 years ago

This package is awesome. Great stuff.

I am currently using this package to connect my application to an external mySQL server, but looks like it does not recognize 'select' for some reason.

`I20160803-09:23:27.387(0)? Exception from sub allemployees id YZaqyjTt3zDY46WeP TypeError: Object [object Object] has no method 'select'

I20160803-09:23:27.388(0)? at [object Object]._handler (konnet-with-mysql/server/server.js:15:19)

I20160803-09:23:27.388(0)? at maybeAuditArgumentChecks (livedata_server.js:1692:12)

I20160803-09:23:27.389(0)? at [object Object]._.extend._runHandler (livedata_server.js:1023:17)

I20160803-09:23:27.389(0)? at [object Object]._.extend._startSubscription (livedata_server.js:842:9)

I20160803-09:23:27.389(0)? at [object Object]._.extend.protocol_handlers.sub (livedata_server.js:614:12) I20160803-09:23:27.390(0)? at livedata_server.js:548:43`

Any idea?

Here is related code:

` var livedb = Mysql.connect(connectionSettings);

Employee = livedb.meteorCollection("users", "employee");

Meteor.publish("allemployees", function(){
return livedb.select(
    'SELECT *FROM users',
    [{ table: 'users' }]
    );
});

`