Closed binhchili closed 3 years ago
When I log the result in executeSql method I should receive data of all rows
result
executeSql
Instead it log this :item: {"rows":{"length":70},"rowsAffected":0}
item: {"rows":{"length":70},"rowsAffected":0}
Here is my code :
let db; ... useEffect(()=>{ db = SQLite.openDatabase({ name: 'highschool.db', createFromLocation: '~highschool.db', }, okCallback, errorCallback); db.transaction((trans => { trans.executeSql('select distinct field2 from highschool', [], (trans, result) => { console.log('item: ' + JSON.stringify(result)); }) })); ... },[]) ...
Try result.rows.raw() without JSON.stringify
@binhchili - has @henrineken hint help resolve your concern? If so please close this issue...
Expected Behavior
When I log the
result
inexecuteSql
method I should receive data of all rowsCurrent Behavior
Instead it log this :
item: {"rows":{"length":70},"rowsAffected":0}
Steps to Reproduce (for bugs)
Here is my code :
Your Environment