Check this example; two lines for initialization, one line for each operation:<p><pre><code> obx::Store store(create_obx_model());
obx::Box<Task> taskBox(store);
obx_id id = box.put({.text = "Buy milk"}); // Create
std::unique_ptr<Task> task = box.get(id); // Read
if (task) {
task->text += " & some bread";
box.put(*task); // Update
...
box.remove(id); // Delete
}
</code></pre>
Can it be done shorter than that?<p>PS.: the example shows user code only, there's a tool to generate boilerplate code, e.g. the Task struct and "binding" it to database.
Here is an example from Wt's DBO tutorial: <a href="https://www.webtoolkit.eu/wt/doc/tutorial/dbo.html" rel="nofollow">https://www.webtoolkit.eu/wt/doc/tutorial/dbo.html</a>