package pgocaml

  1. Overview
  2. Docs
module Simple_thread : sig ... end
type 'a t
type !'a monad = 'a
type isolation = [
  1. | `Read_committed
  2. | `Read_uncommitted
  3. | `Repeatable_read
  4. | `Serializable
]
type access = [
  1. | `Read_only
  2. | `Read_write
]
exception Error of string
exception PostgreSQL_Error of string * (char * string) list
val connect : ?host:string -> ?port:int -> ?user:string -> ?password:string -> ?database:string -> ?unix_domain_socket_dir:string -> unit -> 'a t monad
val close : 'a t -> unit monad
val ping : 'a t -> unit monad
val begin_work : ?isolation:isolation -> ?access:access -> ?deferrable:bool -> 'a t -> unit monad
val commit : 'a t -> unit monad
val rollback : 'a t -> unit monad
val serial : 'a t -> string -> int64 monad
val serial4 : 'a t -> string -> int32 monad
val serial8 : 'a t -> string -> int64 monad
val max_message_length : int Pervasives.ref
val verbose : int Pervasives.ref
val set_private_data : 'a t -> 'a -> unit
val private_data : 'a t -> 'a
type pa_pg_data = (string, bool) Hashtbl.t
type oid = int32
type param = string option
type result = string option
type row = result list
val prepare : 'a t -> query:string -> ?name:string -> ?types:oid list -> unit -> unit monad
val execute_rev : 'a t -> ?name:string -> ?portal:string -> params:param list -> unit -> row list monad
val execute : 'a t -> ?name:string -> ?portal:string -> params:param list -> unit -> row list monad
val cursor : 'a t -> ?name:string -> ?portal:string -> params:param list -> (row -> unit monad) -> unit monad
val close_statement : 'a t -> ?name:string -> unit -> unit monad
val close_portal : 'a t -> ?portal:string -> unit -> unit monad
type row_description = result_description list
and result_description = {
  1. name : string;
  2. table : oid option;
  3. column : int option;
  4. field_type : oid;
  5. length : int;
  6. modifier : int32;
}
type params_description = param_description list
and param_description = {
  1. param_type : oid;
}
val describe_statement : 'a t -> ?name:string -> unit -> (params_description * row_description option) monad
val describe_portal : 'a t -> ?portal:string -> unit -> row_description option monad
val name_of_type : ?modifier:int32 -> oid -> string
type inet = Unix.inet_addr * int
type timestamptz = CalendarLib.Calendar.t * CalendarLib.Time_Zone.t
type int16 = int
type bytea = string
type point = float * float
type hstore = (string * string option) list
type bool_array = bool array
type int32_array = int32 array
type int64_array = int64 array
type string_array = string array
type float_array = float array
val string_of_oid : oid -> string
val string_of_bool : bool -> string
val string_of_int : int -> string
val string_of_int16 : int16 -> string
val string_of_int32 : int32 -> string
val string_of_int64 : int64 -> string
val string_of_float : float -> string
val string_of_point : point -> string
val string_of_hstore : hstore -> string
val string_of_inet : inet -> string
val string_of_timestamp : CalendarLib.Calendar.t -> string
val string_of_timestamptz : timestamptz -> string
val string_of_date : CalendarLib.Date.t -> string
val string_of_time : CalendarLib.Time.t -> string
val string_of_interval : CalendarLib.Calendar.Period.t -> string
val string_of_bytea : bytea -> string
val string_of_string : string -> string
val string_of_unit : unit -> string
val string_of_bool_array : bool_array -> string
val string_of_int32_array : int32_array -> string
val string_of_int64_array : int64_array -> string
val string_of_string_array : string_array -> string
val string_of_float_array : float_array -> string
val oid_of_string : string -> oid
val bool_of_string : string -> bool
val int_of_string : string -> int
val int16_of_string : string -> int16
val int32_of_string : string -> int32
val int64_of_string : string -> int64
val float_of_string : string -> float
val point_of_string : string -> point
val hstore_of_string : string -> hstore
val inet_of_string : string -> inet
val timestamp_of_string : string -> CalendarLib.Calendar.t
val timestamptz_of_string : string -> timestamptz
val date_of_string : string -> CalendarLib.Date.t
val time_of_string : string -> CalendarLib.Time.t
val interval_of_string : string -> CalendarLib.Calendar.Period.t
val bytea_of_string : string -> bytea
val unit_of_string : string -> unit
val bool_array_of_string : string -> bool_array
val int32_array_of_string : string -> int32_array
val int64_array_of_string : string -> int64_array
val string_array_of_string : string -> string_array
val float_array_of_string : string -> float_array
val bind : 'a monad -> ('a -> 'b monad) -> 'b monad
val return : 'a -> 'a monad
OCaml

Innovation. Community. Security.