I am trying to get the whole result as array of rows from sqlite query results object:
I have tried results.rows.item(i).id and it work just fine but I need to get the whole array of rows instead of only one item, i tried to use rows.array (_number) from Expo documentation but I can't figure out how actually to use .array(_number)
my code snippet:
iris.transaction(tx => {
tx.executeSql(
`select id, date from days`,
[],
(tx, results) => {
for(i=0; i<results.rows.length; i++){
var date = results.rows.item(i).date.split('-');
}
}
)
});