package macaque

  1. Overview
  2. Docs
include module type of struct include Sql_base end
type 'a tuple = (string * 'a) list
type 'a result_parser = (string array * int ref) -> 'a
type untyped = Obj.t
val path_separator : string
type oid = PGOCaml.oid
and int16 = PGOCaml.int16
and bytea = PGOCaml.bytea
and timestamp = CalendarLib.Calendar.t
and timestamptz = PGOCaml.timestamptz
and int32_array = PGOCaml.int32_array
include module type of struct include Sql_types end
module SQLI = Sql_types.SQLI
type 'a writable = 'a Sql_types.writable
type non_writable = Sql_types.non_writable
type nullable = Sql_types.nullable
type non_nullable = Sql_types.non_nullable
class type 't type_info = object ... end
class type numeric_t = object ... end
class type unit_t = object ... end
class type bool_t = object ... end
class type int16_t = object ... end
class type int32_t = object ... end
class type int64_t = object ... end
class type float_t = object ... end
class type string_t = object ... end
class type bytea_t = object ... end
class type time_t = object ... end
class type date_t = object ... end
class type timestamp_t = object ... end
class type timestamptz_t = object ... end
class type interval_t = object ... end
class type int32_array_t = object ... end
class type 'row row_t = object ... end
type 't type_info_only = < t : 't type_info >
type +'a t = SQLI.value
val untyped_t : 'a -> 'a
type 'phant binary_op = 'a t -> 'b t -> 'c t constraint 'a = < t : 'in_t ; nul : 'n.. > constraint 'b = < t : 'in_t ; nul : 'n.. > constraint 'c = < t : 'out_t ; nul : 'n > constraint 'phant = < in_t : 'in_t ; out_t : 'out_t ; nul : 'n ; a : 'a ; b : 'b >
type 'a record_parser = 'a SQLI.record_parser
type (+'a, 'w) view = SQLI.view
val untyped_view : 'a -> 'a
type +'a query = SQLI.query
type where = SQLI.where
type from = SQLI.from
type 'a sql_type = SQLI.sql_type
val untyped_type : 'a -> 'a
val recover_type : SQLI.sql_type -> SQLI.sql_type -> SQLI.sql_type
val get_type : ('a * 'b) -> 'b
type +'a result = SQLI.result constraint 'a = < .. >
type 'a unsafe = 'a
val unsafe : 'a -> 'a unsafe
val force_gettable : < .. > t -> < get : unit.. > t
type ('a, 'b) witness = 'b
type 'n nul_witness = ('n, bool) witness
val nullable_witness : bool
val non_nullable_witness : bool
type 'a atom = SQLI.atom
val get_val : < get : 'b ; t : 'a type_info.. > atom -> 'a
val get : 'a t -> 'b
val getn : 'a t -> 'b option
type grouped_row = unit
val grouped_row : unit
type 'a accum = 'a t
type 'a group = 'a t
val accum : 'a -> 'a
val group_of_accum : 'a -> 'a
val handle_query_results : 'a query -> string array list -> 'a
val break : 'a -> 'a
val break_view : 'a -> 'a
include module type of struct include Sql_builders end
val null_workaround : (Sql_internals.value' * Sql_internals.sql_type) -> Sql_internals.value' * Sql_internals.sql_type

operations

val check_atom_type : Sql_internals.sql_type -> Sql_internals.atom_type -> unit
val fixed_op : string -> (Sql_internals.value' * Sql_internals.sql_type) -> (Sql_internals.value' * Sql_internals.sql_type) -> Sql_internals.sql_type -> Sql_internals.value' * Sql_internals.sql_type
val op : (Sql_internals.sql_type -> Sql_internals.sql_type) -> string -> (Sql_internals.value' * Sql_internals.sql_type) -> (Sql_internals.value' * Sql_internals.sql_type) -> Sql_internals.value' * Sql_internals.sql_type
val cast : Sql_internals.value -> Sql_internals.sql_type -> Sql_internals.value' * Sql_internals.sql_type

values

val field : Sql_internals.value -> Sql_internals.field_name list -> 'a -> Sql_internals.value' * Sql_internals.sql_type
val default : Sql_internals.concrete_view Sql_internals.generic_view -> string -> 'a -> Sql_internals.value
val row : Sql_internals.row_name -> Sql_internals.view -> Sql_internals.value' * Sql_internals.sql_type
val tuple : Sql_internals.value Sql_base.tuple -> (tuple:'a -> Sql_internals.value Sql_base.tuple) -> (Sql_internals.descr -> (string array * int ref) -> 'b) -> Sql_internals.value' * Sql_internals.sql_type
val if_then_else : Sql_internals.value -> Sql_internals.value -> Sql_internals.value -> Sql_internals.value' * Sql_internals.sql_type
val match_null : Sql_internals.value -> Sql_internals.value -> (Sql_internals.value -> Sql_internals.value) -> Sql_internals.value
val table : Sql_internals.descr -> (row:'a -> Sql_internals.value Sql_base.tuple) -> (Sql_internals.descr -> (string array * int ref) -> 'b) -> Sql_internals.table_name -> ('c * Sql_internals.value Sql_base.tuple) -> Sql_internals.concrete_view Sql_internals.generic_view

tables

val view : (Sql_internals.select_result * Sql_internals.sql_type) -> ?order_by:(Sql_internals.value * Sql_internals.order) list -> ?limit:Sql_internals.value -> ?offset:Sql_internals.value -> Sql_internals.from -> Sql_internals.where -> Sql_internals.concrete_view Sql_internals.generic_view

views

type order = Sql_internals.order =
  1. | Asc
  2. | Desc

results

val simple_select : Sql_internals.row -> Sql_internals.select_result * Sql_internals.sql_type
val group : Sql_internals.row -> Sql_internals.row -> Sql_internals.select_result * Sql_internals.sql_type
val get_table : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.table_data Sql_internals.generic_view

queries

val value : Sql_internals.value -> Sql_internals.query
val select : Sql_internals.view -> Sql_internals.query
val insert : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.view -> Sql_internals.query
val delete : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.row_name -> Sql_internals.from -> Sql_internals.where -> Sql_internals.query
val update : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.row_name -> Sql_internals.value -> 'a -> Sql_internals.from -> Sql_internals.where -> Sql_internals.query
include module type of struct include Sql_public end
val sql_of_query : Sql_internals.query -> string
val sql_of_view : Sql_internals.view -> string
val parse : Sql_internals.sql_type -> (string array * int ref) -> 'a
module Value = Sql_public.Value
type 'a sequence = string * Sql_internals.atom_type
module Sequence = Sql_public.Sequence
module Op = Sql_public.Op
module Table_type = Sql_public.Table_type
module View = Sql_public.View
module ViewOp = Sql_public.ViewOp
type 'a nullable_data = < get : unit ; t : 'a ; nul : Sql_types.nullable > Sql_types.t
type 'a non_nullable_data = < get : unit ; t : 'a ; nul : Sql_types.non_nullable > Sql_types.t
OCaml

Innovation. Community. Security.