Skip to content

send a misspelled query doesn't return error string #22

@risingphoenix

Description

@risingphoenix

Hi

if I send a query like this:

db.query('select jhgfkjhg * from users',function(err,data) {
    console.log(err);
    console.log(data);
});

err is null and data is an array of 0 elements.

even if a set a global listener db.on('error'... the error inside the closure is an array of 0 elements.

if I send a query like this:

db.query('select jhgfkjhg * from users',null,{id:Number},function(err,data) {
    console.log(err);
    console.log(data);
});

returns:

Uncaught node.js Error 
TypeError: Cannot call method 'forEach' of undefined
    at Socket.eval (... \node_modules\dblite\build\dblite.node.js:296:25 ...)

I run all my code under node-webkit

I do something wrong?
Thanks for your code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions