diff options
Diffstat (limited to 'lib/abstract/Storage.ml')
| -rw-r--r-- | lib/abstract/Storage.ml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml new file mode 100644 index 0000000..d0f2097 --- /dev/null +++ b/lib/abstract/Storage.ml @@ -0,0 +1,18 @@ +module type STORAGE = sig + type connection + type transaction + + val connect: Concepts.Configuration.configuration -> connection + + (** begin a transaction within `connection` *) + val start: connection -> transaction + (** `commit` the current transaction *) + val commit: transaction -> () + (** `abort` the current transaction *) + val abort: transaction -> () + + (** within a transaction, fetch a blob from disk *) + val get: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob + (** within a transaction, associate a hash with a blob on disk *) + val put: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob -> () +end |
