diff options
Diffstat (limited to 'lib/syntax/importerSyntax.mli')
-rw-r--r-- | lib/syntax/importerSyntax.mli | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/syntax/importerSyntax.mli b/lib/syntax/importerSyntax.mli new file mode 100644 index 0000000..49b7364 --- /dev/null +++ b/lib/syntax/importerSyntax.mli @@ -0,0 +1,37 @@ +module Extern : sig + type t = { + intern_key : ImportDataTypes.Path.t ImportExpression.T.t; + target : ImportDataTypes.Table.t; + extern_key : ImportDataTypes.Path.column ImportExpression.T.t; + allow_missing : bool; + match_rule : string option; + } + [@@deriving show, eq] +end + +module CTE = Cte + +type t = { + version : int; + locale : string option; + source : ImportDataTypes.Table.t; + externals : Extern.t list; + columns : ImportDataTypes.Path.t ImportExpression.T.t list; + filters : ImportDataTypes.Path.t ImportExpression.T.t list; + sort : ImportDataTypes.Path.t ImportExpression.T.t list; + uniq : ImportDataTypes.Path.t ImportExpression.T.t list; +} + +val repr : t -> Otoml.t + +val root_table : t -> ImportDataTypes.Table.t +(** Get the root table, this table is the main table to load and each line in + this table will be processed *) + +val get_table_for_name : t -> string option -> ImportDataTypes.Table.t + +val get_dependancies_for_table : t -> ImportDataTypes.Table.t -> Extern.t list +(** Get all the externals refered by the source *) + +val dummy_conf : t +val latest_version : int |