MySQL Forums
Forum List  »  Connector/Node.js

Re: how do we work with rational tables in devapi?
Posted by: Rui Quelhas
Date: September 24, 2018 01:41AM

Hi there,

the fetchOne() method is not available in the Connector/Node.js API. Maybe you are looking at the MySQL Shell JavaScript API (which is a little bit different).

To handle resultset records in Connector/Node.js, you need to provide a callback when calling the execute() method. Something like:


var rows = [];

table.select()
.execute(row => rows.push(row))
.then(() => console.log(rows));

Options: ReplyQuote


Subject
Written By
Posted
Re: how do we work with rational tables in devapi?
September 24, 2018 01:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.