doc: update README with the new upsert function for catalog

This commit is contained in:
2025-10-16 15:18:30 +02:00
parent e4ddeaf400
commit 7509bd2bdf

View File

@@ -103,7 +103,7 @@ fn main() {
price: 125000, price: 125000,
}; };
// Insert the new laptop into the catalog. Note that at this time the product is in memory. // Insert the new laptop into the catalog. Note that at this time the product is in memory.
catalog.insert(new_laptop); catalog.upsert(new_laptop);
// Persist the changes in the catalog to the database. // Persist the changes in the catalog to the database.
catalog.persist().unwrap(); catalog.persist().unwrap();
// Remove the SQLite database file. // Remove the SQLite database file.