aboutsummaryrefslogtreecommitdiffstats
path: root/lib/abstract
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-07-11 00:51:11 -0300
committerGitHub <noreply@github.com>2026-07-11 00:51:11 -0300
commitbb3156b8ab78b035ce886bbe3021ec7cbe269d03 (patch)
tree82dd52655d25e49519a035f1245c703e910a2152 /lib/abstract
parent85bff2fc22a131cce5ec2b4eb4b3dd8269c247cd (diff)
downloadRNT-bb3156b8ab78b035ce886bbe3021ec7cbe269d03.tar.gz
RNT-bb3156b8ab78b035ce886bbe3021ec7cbe269d03.zip
FOL: First Order Logic Execution Engine
Co-authored-by: Estevan Castilho <tevo@riajuu.net>
Diffstat (limited to 'lib/abstract')
-rw-r--r--lib/abstract/Storage.ml23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml
index d0f2097..f456567 100644
--- a/lib/abstract/Storage.ml
+++ b/lib/abstract/Storage.ml
@@ -2,17 +2,28 @@ module type STORAGE = sig
type connection
type transaction
- val connect: Concepts.Configuration.configuration -> connection
+ val connect :
+ Concepts.Configuration.configuration -> (connection, Concepts.Condition.condition) result
(** begin a transaction within `connection` *)
- val start: connection -> transaction
+ val start : connection -> (transaction, Concepts.Condition.condition) result
+
(** `commit` the current transaction *)
- val commit: transaction -> ()
+ val commit : transaction -> (unit, Concepts.Condition.condition) result
+
(** `abort` the current transaction *)
- val abort: transaction -> ()
+ val abort : transaction -> (unit, Concepts.Condition.condition) result
(** within a transaction, fetch a blob from disk *)
- val get: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob
+ val get :
+ transaction ->
+ Concepts.Hash.hash ->
+ (Concepts.Representation.blob option, Concepts.Condition.condition) result
+
(** within a transaction, associate a hash with a blob on disk *)
- val put: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob -> ()
+ val put :
+ transaction ->
+ Concepts.Hash.hash ->
+ Concepts.Representation.blob ->
+ (unit, Concepts.Condition.condition) result
end