doc: update README with the new upsert function for catalog
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user