Work with WebSockets

Read and write files

Persist data with SQLite

Cookbook

Persistence

Persist data with SQLite

1. Add the dependencies

2. Define the Dog data model

3. Open the database

4. Create the dogs table

5. Insert a Dog into the database

6. Retrieve the list of Dogs

7. Update a Dog in the database

8. Delete a Dog from the database

Example

If you are writing an app that needs to persist and query large amounts of data on
the local device, consider using a database instead of a local file or
key-value store. In general, databases provide faster inserts, updates,
and queries compared to other local persistence solutions.