Skip to content

Query results are udefined #96

Description

@RobertZito

Does this make sense, I am attempting to get the deptname from dept, the trace looks right with SELECT count(*) as count FROM depts t0 WHERE t0.groupname = :1 [ 'warehouse' ], when I run this direct in sql developer I get the right results but if I log console.log(count) I get undefined. Am I returning the results properly?

var persist = require("persist");
var type = persist.type;

dept = persist.define('ALERT', {
'id': type.INTEGER,
'deptname': type.STRING
});

persist.connect({
"driver": "oracle",
"hostname": "127.0.0.1",
"database": "hr",
"user": "user",
"password": "password",
trace: true
},

function(err, connection) {
    alert.where('deptname = ?', 'warehouse').count(connection, function(err, count) {

        console.log(count);
    });
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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