diff options
Diffstat (limited to 'lib/manipulation.ml')
| -rw-r--r-- | lib/manipulation.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/manipulation.ml b/lib/manipulation.ml index dd09378..55b1c32 100644 --- a/lib/manipulation.ml +++ b/lib/manipulation.ml @@ -14,11 +14,11 @@ (** Functor to create manipulation operations with a storage backend *) module Make (Storage : Management.Physical.S) = struct - include Nt - type storage = Storage.t type error = Error.t - + + let ( let* ) = Result.bind + (* State Persistence - Store relation and database states *) (** Store a relation state to storage *) @@ -30,11 +30,13 @@ module Make (Storage : Management.Physical.S) = struct | Error _ -> Error (Error.StorageError "Failed to store relation") | Ok () -> Ok () - (** Store a database state to storage *) + (** Store a database state to storage. + Keyed by [db#name]; content-hashing of mgs is no longer maintained on the + Sakura side — the kernel owns mg content addressing. *) let store_multigroup (storage : storage) (db : Management.Multigroup.multigroup) : (unit, error) Result.t = match - Storage.store_raw storage db#hash (Storable.Multigroup.to_bytes @@ db#serialize ()) + Storage.store_raw storage db#name (Storable.Multigroup.to_bytes @@ db#serialize ()) with | Error _ -> Error (Error.StorageError "Failed to store multigroup") | Ok () -> Ok () |
