diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-06 20:27:49 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-06 20:27:49 -0300 |
| commit | b2b1d9a3a8cbf2f5d0089e29931cacf36297065a (patch) | |
| tree | 77e5ffd790dce2aed3dbca118253dd75c419127e /lib/management/database.ml | |
| parent | b1eefaa8ab07d41bb0b0975ffdd62ef9aba47811 (diff) | |
| download | Sakura-b2b1d9a3a8cbf2f5d0089e29931cacf36297065a.tar.gz Sakura-b2b1d9a3a8cbf2f5d0089e29931cacf36297065a.zip | |
wip: physical
Diffstat (limited to 'lib/management/database.ml')
| -rw-r--r-- | lib/management/database.ml | 23 |
1 files changed, 23 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 |
