(db: SQLiteDatabase, text: string)
| 137 | //#region Database Operations |
| 138 | |
| 139 | async function addItemAsync(db: SQLiteDatabase, text: string): Promise<void> { |
| 140 | if (text !== '') { |
| 141 | await db.runAsync( |
| 142 | 'INSERT INTO items (done, value) VALUES (?, ?);', |
| 143 | false, |
| 144 | text |
| 145 | ); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | async function updateItemAsDoneAsync( |
| 150 | db: SQLiteDatabase, |