Skip to content

Simplify Eventgen #6188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ocaml/idl/datamodel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10448,7 +10448,18 @@ let all_system =
* updated must come first. The second field will be automatically * kept
* up-to-date. *)

(** These are the pairs of (object, field) which are bound together in the database schema *)
(**
These are the pairs of (object, field) which are bound together in
the database schema.

It is assumed that, for any entry (p, p'), neither p nor p'
appears in any other entry. It may be the case that p = p', which
is the only instance where some object-field pair may appear more
than once.

This is implicitly assumed by other code which treats this list -
and its symmetric closure - as an association list
without duplicate keys. *)
let all_relations =
[
(* snapshots *)
Expand Down
3 changes: 1 addition & 2 deletions ocaml/idl/ocaml_backend/gen_db_actions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ let db_action api : O.Module.t =
O.Let.make ~name:"_" ~params:[] ~ty:"unit"
~body:
[
Printf.sprintf "Hashtbl.add Eventgen.get_record_table \"%s\""
obj.DT.name
Printf.sprintf "Eventgen.set_get_record \"%s\"" obj.DT.name
; Printf.sprintf
"(fun ~__context ~self -> (fun () -> API.rpc_of_%s_t \
(%s.get_record ~__context ~self:(Ref.of_%sstring self))))"
Expand Down
Loading
Loading