Discovering bulk algebraic data operations
Back in the Immutable values section, we used the .update()
method to update the ApplicationContext
entity field value. You may be wondering why you can't simply update the field value using a dot, like this:
context.enableEmailService = true;
Recall that all values in Bosque are immutable and that this kind of syntax implies that we are modifying the context
value, which is forbidden by design.
This is why we need another way of doing this. But that's not all we have to say about this method, nor is this the only one that is considered a bulk algebraic data operation. Such operations include the following:
- Bulk read
- Bulk update
- Projection
- Merge
We will describe them one at a time, but first, let's add new requirements to our email sending app. This will help us to understand the next few sections.
Imagine that we have three additional integer fields in the ApplicationContext
entity called...