package links

  1. Overview
  2. Docs
type t =
  1. | Lens of {
    1. table : Database.Table.t;
    2. database : Database.t;
    3. sort : Sort.t;
    }
  2. | LensSelect of {
    1. lens : t;
    2. predicate : Phrase.t;
    3. sort : Sort.t;
    }
  3. | LensJoin of {
    1. left : t;
    2. right : t;
    3. on : (string * string * string) list;
    4. del_left : Phrase.t;
    5. del_right : Phrase.t;
    6. sort : Sort.t;
    }
val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
val string_of_value : t -> string
val sort : t -> Sort.t
val is_memory_lens : t -> bool
val columns : t -> Column.List.t
val cols_present_aliases : t -> string list

returns the aliases of all present columns.

val colset : t -> Column.Set.t
val fundeps : t -> Fun_dep.Set.t
val predicate : t -> Phrase.t option
val get_primary_key : t -> Alias.Set.t
val generate_query : t -> Database.Select.t
val lens_get : t -> Links_lens__.Phrase_value.t list

Fetch the records of a lens from the database.

val lens_select_internal : t -> predicate:Phrase.t -> t

Construct a select lens using the specified underlying lens and select predicate. This should not be used to construct lenses in general, as it may have a bad put direction.

val lens_get_select_opt : t -> predicate:Phrase.t option -> Links_lens__.Phrase_value.t list

Generate a select lens from the specified lens and query its results.

val query_exists : t -> Phrase.t -> bool
OCaml

Innovation. Community. Security.