d8bde6ed97
There are two ways to create each builder, directly from a `Store` or from an `InProgress`. Creating from `Store` will perform two actions, creating a new `InProgress` and then returning a builder from that `InProgress`. In the case of `store_entity_builder_with_entid` and `store_entity_builder_from_tempid`, the function goes a step further and calls `describe` or `describe_tempid` from the created `InProgressBuilder` and returning the `EntityBuilder` that results. These two functions are replicated on `InProgress`. This has been done to reduce the overhead of objects being passed over the FFI boundary. The decision to do this enables us to go from something like ``` in_progress = store_begin_transaction(store); builder = in_progress_builder(in_progress); entity_builder = in_progress_builder_describe(builder, entid); ``` to ``` entity_builder = store_entity_builder_from_entid(store); ``` There is an `add_*` and `retract_*` function specified for each `TypedValue` type for both `InProgressBuilder` and `EntityBuilder`. To enable `transact` on `EntityBuilder` and `InProgressBuilder`, a new `repr(C)` struct has been created that contains a pointer to an `InProgress` and a pointer to a `Result<TxReport>` to allow passing the tuple result returned from `transact` on those types over the FFI. Commit is possible from both builders and `InProgress`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |