Created
February 20, 2018 17:04
-
-
Save Norbert515/08f4398c9184c3627d745f7f21d5cab8 to your computer and use it in GitHub Desktop.
updateBook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Inserts or replaces the book. | |
Future updateBook(Book book) async { | |
await db.inTransaction(() async { | |
await db.rawInsert( | |
'INSERT OR REPLACE INTO ' | |
'$tableName(${Book.db_id}, ${Book.db_title}, ${Book.db_url}, ${Book.db_star}, ${Book.db_notes})' | |
' VALUES("${book.id}", "${book.title}", "${book.url}", ${book.starred? 1:0}, "${book.notes}")'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment