Saving and updating data to our SQLite database is just a matter of creating a function for each Create, Read, Update, and Delete (CRUD) operation that we need, and forming the SQL statement before we execute it against the local database (our
In this recipe, we'll edit the
database.js module file to return a
db object that contains two new functions, one for inserting a record into our
favorites table and one for deleting a record. We'll also capture the click events on our table rows to allow the user to view the record in a detailed subwindow, and add a button for creating and deleting favorites.
database.js, and replace its contents with the ...