aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMarcos Magueta <mmagueta@MacMini.local>2024-11-24 22:23:32 -0300
committerMarcos Magueta <mmagueta@MacMini.local>2024-11-24 22:23:32 -0300
commit3235bcba70e0b9a5e9a8ed0fc18f96ce5c6beb57 (patch)
tree0d7202961ebb0fc62d593c6ff403fbafdf0292db /bin
parentc310cdc8d684a89e24b8b5910e39c4894b60c7c0 (diff)
downloadSakura-3235bcba70e0b9a5e9a8ed0fc18f96ce5c6beb57.tar.gz
Sakura-3235bcba70e0b9a5e9a8ed0fc18f96ce5c6beb57.zip
relation building
Diffstat (limited to 'bin')
-rw-r--r--bin/main.ml26
1 files changed, 1 insertions, 25 deletions
diff --git a/bin/main.ml b/bin/main.ml
index 8250c44..4ea66d0 100644
--- a/bin/main.ml
+++ b/bin/main.ml
@@ -1,28 +1,4 @@
-open Relational_engine.Disk
-
-let x() =
- let command_write1: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837830"; content = "asd"; filename = "trash"} in
- let command_write2: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837831"; content = "qwe"; filename = "trash2"} in
- let command_write3: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837832"; content = "fgh"; filename = "trash"} in
- let command_write4: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837833"; content = "rty"; filename = "trash2"} in
- let command_write5: Command.t =
- {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837834"; content = "jkl"; filename = "trash"} in
- let command_read: Command.t = {kind = Command.READ; timestamp = 0.0; hash = ""; content = ""; filename = "trash"} in
- let stream: Executor.history = [{state = Executor._EMPTY_SHA_HASH_; files = Executor.StringMap.empty}] in
- let locations: Executor.locations = Executor.StringMap.empty in
- let open Relational_engine.Extensions.Result in
- let+ (stream, locations) = Command.commit_and_perform stream locations command_write1 in
- let+ (stream, locations) = Command.commit_and_perform stream locations command_write2 in
- let+ (stream, locations) = Command.commit_and_perform stream locations command_write3 in
- let+ (stream, locations) = Command.commit_and_perform stream locations command_write4 in
- let+ (stream, locations) = Command.commit_and_perform stream locations command_write5 in
- Command.commit_and_perform (List.tl stream) locations command_read
-
let () =
begin
- let _ = x() in ()
+ let _ = Relational_engine.Relation.write_and_retrieve() in ()
end