aboutsummaryrefslogblamecommitdiffstats
path: root/lib/backend/managers/Cursor.ml
blob: 7fdbb6fd0d39bccf4804b594ef1efee5f726aded (plain) (tree)
1
2
3
4
5
6
7
8
9





                                            

                                   
                                                                                     














                                                                                                    
(* @composes Storage -- functor parameter *)
(* @needs Path *)
(* @needs Tuple *)
(* @needs Value *)
(* @needs Condition *)

type descriptor =
  | Stored of {merkle_root: string}
  | Ephemeral of {merkle_root: string; dependencies: Concepts.Path.t BatFingerTree.t}

module Make (Store : Abstract.Storage.STORAGE) = struct
  type cursor = unit

  let open_ (_txn : Store.transaction) (descriptor : descriptor)
      ~(args : Concepts.Value.value BatFingerTree.t) : (cursor, Concepts.Condition.condition) result
      =
    ignore (descriptor, args);
    failwith "NOT IMPLEMENTED: open a cursor by paging the relation's Merkle tree over Store.get"

  let next (_cursor : cursor) : (Concepts.Tuple.t option, Concepts.Condition.condition) result =
    failwith "NOT IMPLEMENTED: page the next tuple over Store.get"

  let close (_cursor : cursor) : unit = ()
end