0
我有这种方法查询数据库。该查询正在工作,我想用查询的结果来做其他事情。问题是,我不能使用数据,因为它在一个目标文件中。反应本地,从对象中提取数据
EventListener() {
this.store.db.executeSql('SELECT id, event FROM eventi WHERE status = "new"', null,
(resultset) => {
console.log(resultset)
alert(resultset)
}, this.NewEventerror)
}
如何得到它?我试过JSON.stringify(resultset)
,但是警报和console.log
没有弹出。 任何想法?
您可以将如何'resultset'的例子对象看起来? – Cherniv
和你的'alert'语法是不正确的,在这里你可以看到你应该如何使用它:http://facebook.github.io/react-native/releases/0.29/docs/alert.html – Cherniv
@Cherniv不幸的是我有没有办法找出它的外观:/ – Romy