diff options
Diffstat (limited to 'lib/management')
| -rw-r--r-- | lib/management/database.ml | 23 | ||||
| -rw-r--r-- | lib/management/physical.ml | 12 |
2 files changed, 35 insertions, 0 deletions
diff --git a/lib/management/database.ml b/lib/management/database.ml new file mode 100644 index 0000000..4fd43f1 --- /dev/null +++ b/lib/management/database.ml @@ -0,0 +1,23 @@ +module RelationMap = Map.Make (String) + +type t = { + hash : Conventions.Hash.t; + name : Conventions.Name.t; + tree : unit; + relations : Relation.t RelationMap.t; + timestamp : float; +} + +let create_database (storage: Physical.Storage.t) ~name = + let relations = + RelationMap.of_list [("less_than", Prelude.Standard.less_than_natural)] + in + let state = + { + hash = ""; + name; + tree = (); + relations = relations; + timestamp = Unix.time (); + } + in Physical.Storage.write storage diff --git a/lib/management/physical.ml b/lib/management/physical.ml new file mode 100644 index 0000000..83ccbcc --- /dev/null +++ b/lib/management/physical.ml @@ -0,0 +1,12 @@ +module type STORAGE = sig + type t + val write: t -> Conventions.Hash.t + +end + +module Storage: STORAGE = struct + type t + let write _ = + failwith "TODO" + +end
\ No newline at end of file |
