Module Mmdb.Coordinates

Interface for retrieving coordinate values from the database

include module type of Coordinates
type t = {
longitude : float;
latitude : float;
}
val pp : Stdlib.Format.formatter -> t -> Ppx_deriving_runtime.unit
val show : t -> Ppx_deriving_runtime.string
include VALUE_TYPE with type answer = Coordinates.t
module Query : sig ... end
type answer = Coordinates.t

The type of answer returned by a query

val from_db : t -> Ip.t -> Query.t -> (answer option, Fetch_error.t) Stdlib.result

Fetches a value directly from the database

val from_ip_data : ip_data -> Query.t -> (answer option, Fetch_value_error.t) Stdlib.result

Fetches a value from an ip_data reference

val location : Query.t

Query that determines the geographical location of an IP