Skip to content

Cannot read data returned from orient-db in Node js using Orentjs  #197

@gprasadg

Description

@gprasadg

Hello,

I am new to orient-db and trying to fetch data from DB in my node application .
I have OrientDB 2.2.7 and orientjs 2.2.x.

  1. I have a function (Javascript ) that returns data from the DB.
    getlist : { return orient.getDatabase().query("select from user where _id = ?", uId ); }
  2. I have used orientjs to call the function as
    odb.open().then(function () {
    {
    return commonjs.odb.query('SELECT getList(:uId, :vId, :mine , :pageNo , :limit)', {
    params: {
    uId: userId,
    vId: VUID,
    mine: all,
    pageNo: offset,
    limit: limit
    }
    }).then(function (res) {
    console.log(JSON.stringify(res));
    }
  3. When I try to stringify the result I get error TypeError: Converting circular structure to JSON
    How do i get data returned from the function ?

Please help ..

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions