Wrapper functions that perform read operations to database asynchronously
interface Person { name: string; age: number; birthday: string;}let allRows = await asyncDatabaseRead<Array<Person>>(db, "SELECT * FROM people;", (rows) => { return rows; }); Copy
interface Person { name: string; age: number; birthday: string;}let allRows = await asyncDatabaseRead<Array<Person>>(db, "SELECT * FROM people;", (rows) => { return rows; });
sqlite3 database object
SQL query to execute
callback to perform further operations on each row
Promise for database operation
Wrapper functions that perform read operations to database asynchronously
Example