From 62123e577ee5d4066d53f8ad7e5ac3d2eb190430 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 18 Nov 2026 20:24:52 +0100 Subject: Securized the queries in the database with a dedicated type for the Identifiers --- lib/configuration/ast.mli | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/configuration/ast.mli') diff --git a/lib/configuration/ast.mli b/lib/configuration/ast.mli index 9fba7f6..33d9bc8 100644 --- a/lib/configuration/ast.mli +++ b/lib/configuration/ast.mli @@ -3,7 +3,8 @@ type list' = { id : string; source : string } val init : unit -> setting -val get_content : setting -> string -> Model.Reference.t Model.Content.t option +val get_content : + setting -> Model.Identifier.t -> Model.Reference.t Model.Content.t option (** Get the content from the setting. *) val root_contents : setting -> Model.Reference.t Model.Content.t list @@ -12,16 +13,16 @@ val root_contents : setting -> Model.Reference.t Model.Content.t list Only the root content are repored in the list *) val register_content : - 'a Type.Id.t -> setting -> ('a * string) Model.Content.t -> unit + 'a Type.Id.t -> setting -> ('a * Model.Identifier.t) Model.Content.t -> unit (** Register a content and all the associated subcontent in the top level, giving the possibility to fetch any content or subcontent by is’s name without traversing the whole tree each time. *) -exception BrokenLink : ('a Type.Id.t * 'a * string) -> exn +exception BrokenLink : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn (** Exception raised when a reference in the configuration targets a non-existing content *) -exception NotImplemented : ('a Type.Id.t * 'a * string) -> exn +exception NotImplemented : ('a Type.Id.t * 'a * Model.Identifier.t) -> exn val register_list : setting -> list' -> setting -- cgit v1.2.3