Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Nativescript中记录Couchbase查询结果_Couchbase_Nativescript_Couchbase Lite_Nativescript Angular - Fatal编程技术网

在Nativescript中记录Couchbase查询结果

在Nativescript中记录Couchbase查询结果,couchbase,nativescript,couchbase-lite,nativescript-angular,Couchbase,Nativescript,Couchbase Lite,Nativescript Angular,我不熟悉Nativescript和Couchbase,但在对我的Couchbase数据库执行查询时,我只想记录结果。下面是我的示例代码: let rows = this.database.executeQuery('profiles'); for(let i = 0; i < rows.length; i++) { this.profiles.push(rows[i]); } let rows=this.database.executeQuery('profiles'

我不熟悉Nativescript和Couchbase,但在对我的Couchbase数据库执行查询时,我只想记录结果。下面是我的示例代码:

let rows = this.database.executeQuery('profiles');

  for(let i = 0; i < rows.length; i++) {
     this.profiles.push(rows[i]);
  }
let rows=this.database.executeQuery('profiles');
for(设i=0;i
当尝试使用console.log记录“行”时,我得到了预期的[Object]。我想我可以使用console.dir,但这样做时我得到:

JS:==dump():转储成员===

JS:“行:”

JS:==dump():转储函数和属性名称===

JS:0:r

JS:1:o

JS:2:w

JS:3:s

JS:4::

JS:5:

JS:6:

JS:==转储():已完成===


是否有办法记录executeQuery的实际结果?

如果您愿意在收集行数组的结果后注销这些结果,您可以使用,并在数组上枚举。可能看起来像这样:

rows.forEach(row => {
    console.log(JSON.stringify(row))
})

rows.forEach(row=>console.log(JSON.stringify(row)))
还是要实时执行?非常好,谢谢!