我在React Native中使用 react-native-sqlite-storage
.
通常,我们这样使用:
tx.executeSql(`SELECT * FROM TABLE_NAME)
.then(([tx, results]) => {
let len = results.rows.length;
let datas = [];
for (let i = 0; i < len; i++) {
datas.push(results.rows.item(i));
}
...
}.catch((err)=>{
...
})
但是,如果我想要 select count(1)
或 max()
之类的executeSql,那么我怎样才能得到我想要的值? results
的结构是什么?