(db: SQLiteDatabase, id: number)
| 210 | } |
| 211 | |
| 212 | async function deleteItemAsync(db: SQLiteDatabase, id: number): Promise<void> { |
| 213 | await db.runAsync('DELETE FROM items WHERE id = ?;', id); |
| 214 | } |
| 215 | |
| 216 | async function migrateDbIfNeeded(db: SQLiteDatabase) { |
| 217 | // Always sync libSQL first to prevent conflicts between local and remote databases |