package caqti

  1. Overview
  2. Docs
Abstraction over multiple database libraries

Install

dune-project
 Dependency

Authors

Maintainers

Sources

caqti-0.9.0.tbz
sha256=4c84a16d983d0fed2786f536a3fa4d8fa113b8b30b4deea4a74772582d5489b2
md5=42a2e2d3b73d7fbaecc618549aad2865

doc/caqti.v1/Caqti1_sigs/module-type-TUPLE/index.html

Module type Caqti1_sigs.TUPLE

Tuple decoding functions.

These functions extracts and decodes components from a returned tuple. The first argument is the index, starting from 0. The conversion performed are the inverse of the same named functions of PARAM, so the documentation is not repeated here.

Note! Calls to these functions are only valid during a callback from one of the query execution functions. Returning a partial call or embedding the call in a returned monad leads to undefined behaviour.

type t

An abstract type for a tuple passed by a backend to callbacks during query execution.

val length : t -> int
val is_null : int -> t -> bool
val option : (int -> t -> 'a) -> int -> t -> 'a option
val bool : int -> t -> bool
val int : int -> t -> int
val int32 : int -> t -> int32
val int64 : int -> t -> int64
val float : int -> t -> float
val string : int -> t -> string
val bytes : int -> t -> bytes
val date_string : int -> t -> string
val date_tuple : int -> t -> int * int * int
val date_cl : int -> t -> CalendarLib.Date.t
val utc_float : int -> t -> float
val utc_string : int -> t -> string
val utc_cl : int -> t -> CalendarLib.Calendar.t