package macaque

  1. Overview
  2. Docs

Module Inner_sqlSource

include module type of struct include Sql_base end
Sourcetype 'a tuple = (string * 'a) list
Sourcetype 'a result_parser = (string array * int ref) -> 'a
Sourcetype untyped = Obj.t
Sourceval path_separator : string
Sourceand time = CalendarLib.Time.t
Sourceand date = CalendarLib.Date.t
Sourceand interval = CalendarLib.Calendar.Period.t
Sourceand timestamp = CalendarLib.Calendar.t
Sourceand timestamptz = PGOCaml.timestamptz
Sourceand int32_array = PGOCaml.int32_array
include module type of struct include Sql_types end
module SQLI = Sql_types.SQLI
Sourcetype 'a writable = 'a Sql_types.writable
Sourcetype non_writable = Sql_types.non_writable
Sourcetype nullable = Sql_types.nullable
Sourcetype non_nullable = Sql_types.non_nullable
Sourceclass type 't type_info = object ... end
Sourceclass type numeric_t = object ... end
Sourceclass type unit_t = object ... end
Sourceclass type bool_t = object ... end
Sourceclass type int16_t = object ... end
Sourceclass type int32_t = object ... end
Sourceclass type int64_t = object ... end
Sourceclass type float_t = object ... end
Sourceclass type string_t = object ... end
Sourceclass type bytea_t = object ... end
Sourceclass type time_t = object ... end
Sourceclass type date_t = object ... end
Sourceclass type timestamp_t = object ... end
Sourceclass type timestamptz_t = object ... end
Sourceclass type interval_t = object ... end
Sourceclass type int32_array_t = object ... end
Sourceclass type 'row row_t = object ... end
Sourcetype 't type_info_only = < t : 't type_info >
Sourcetype +'a t = SQLI.value
Sourceval untyped_t : 'a -> 'a
Sourcetype '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 >
Sourcetype 'a record_parser = 'a SQLI.record_parser
Sourcetype (+'a, 'w) view = SQLI.view
Sourceval untyped_view : 'a -> 'a
Sourcetype +'a query = SQLI.query
Sourcetype where = SQLI.where
Sourcetype from = SQLI.from
Sourcetype 'a sql_type = SQLI.sql_type
Sourceval untyped_type : 'a -> 'a
Sourceval recover_type : SQLI.sql_type -> SQLI.sql_type -> SQLI.sql_type
Sourceval get_type : ('a * 'b) -> 'b
Sourcetype +'a result = SQLI.result constraint 'a = < .. >
Sourcetype 'a unsafe = 'a
Sourceval unsafe : 'a -> 'a unsafe
Sourceval force_gettable : SQLI.value -> < get : unit.. > t
Sourcetype ('a, 'b) witness = 'b
Sourcetype 'n nul_witness = ('n, bool) witness
Sourceval nullable_witness : bool
Sourceval non_nullable_witness : bool
Sourcetype 'a atom = SQLI.atom
Sourceval get_val : SQLI.atom -> 'a
Sourceval get : 'a t -> 'b
Sourceval getn : 'a t -> 'b option
Sourcetype grouped_row = unit
Sourceval grouped_row : unit
Sourcetype 'a accum = 'a t
Sourcetype 'a group = 'a t
Sourceval accum : 'a -> 'a
Sourceval group_of_accum : 'a -> 'a
Sourceval handle_query_results : SQLI.query -> string array list -> 'a
Sourceval break : 'a -> 'a
Sourceval break_view : 'a -> 'a
include module type of struct include Sql_builders end
Sourceval null_workaround : (Sql_internals.value' * Sql_internals.sql_type) -> Sql_internals.value' * Sql_internals.sql_type

operations

Sourceval check_atom_type : Sql_internals.sql_type -> Sql_internals.atom_type -> unit
Sourceval 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
Sourceval 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
Sourceval cast : Sql_internals.value -> Sql_internals.sql_type -> Sql_internals.value' * Sql_internals.sql_type

values

Sourceval field : Sql_internals.value -> Sql_internals.field_name list -> 'a -> Sql_internals.value' * Sql_internals.sql_type
Sourceval default : Sql_internals.concrete_view Sql_internals.generic_view -> string -> 'a -> Sql_internals.value
Sourceval row : Sql_internals.row_name -> Sql_internals.view -> Sql_internals.value' * Sql_internals.sql_type
Sourceval 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
Sourceval if_then_else : Sql_internals.value -> Sql_internals.value -> Sql_internals.value -> Sql_internals.value' * Sql_internals.sql_type
Sourceval match_null : Sql_internals.value -> Sql_internals.value -> (Sql_internals.value -> Sql_internals.value) -> Sql_internals.value
Sourceval 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

Sourceval 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

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

results

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

queries

Sourceval value : Sql_internals.value -> Sql_internals.query
Sourceval select : Sql_internals.view -> Sql_internals.query
Sourceval insert : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.view -> Sql_internals.query
Sourceval delete : Sql_internals.concrete_view Sql_internals.generic_view -> Sql_internals.row_name -> Sql_internals.from -> Sql_internals.where -> Sql_internals.query
Sourceval 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
Sourceval sql_of_query : Sql_internals.query -> string
Sourceval sql_of_view : Sql_internals.view -> string
Sourceval parse : Sql_internals.sql_type -> (string array * int ref) -> 'a
Sourcemodule Value = Sql_public.Value
Sourcetype 'a sequence = string * Sql_internals.atom_type
Sourcemodule Sequence = Sql_public.Sequence
Sourcemodule Table_type = Sql_public.Table_type
Sourcemodule View = Sql_public.View
Sourcemodule ViewOp = Sql_public.ViewOp
Sourcetype 'a nullable_data = < get : unit ; t : 'a ; nul : Sql_types.nullable > Sql_types.t
Sourcetype 'a non_nullable_data = < get : unit ; t : 'a ; nul : Sql_types.non_nullable > Sql_types.t