package sqlite3_utils

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Sqlite3_utils.TySource

Values representing types to pass to a statement, or to extract from a row

Sourcetype ('a, 'res) t

A representation of a type that returns 'res. 'a is typically a function type with the arguments one would expect, for example (int -> string -> 'res, 'res) t would be used for a query that is parametrized by two values of type int and string respectively.

Sourcetype 'a arg
Sourceval int : int arg
Sourceval int64 : int64 arg
Sourceval float : float arg
Sourceval text : string arg
Sourceval blob : string arg
Sourceval any_str : string arg
Sourceval data : Data.t arg
Sourceval nil : ('res, 'res) t

0 type arguments

Sourceval (@>) : 'a arg -> ('b, 'res) t -> ('a -> 'b, 'res) t

Right-associative chaining. int @> float @> nil represents two arguments of type int and float respectively, and is the same as int @> (float @> nil).

Sourceval p1 : 'a arg -> ('a -> 'res, 'res) t

Exactly one argument of type 'a

Sourceval p2 : 'a arg -> 'b arg -> ('a -> 'b -> 'res, 'res) t

Exactly two arguments of types 'a and 'b respectively.

Sourceval p3 : 'a arg -> 'b arg -> 'c arg -> ('a -> 'b -> 'c -> 'res, 'res) t
Sourceval p4 : 'a arg -> 'b arg -> 'c arg -> 'd arg -> ('a -> 'b -> 'c -> 'd -> 'res, 'res) t
Sourceval p5 : 'a arg -> 'b arg -> 'c arg -> 'd arg -> 'e arg -> ('a -> 'b -> 'c -> 'd -> 'e -> 'res, 'res) t
Sourceval p6 : 'a arg -> 'b arg -> 'c arg -> 'd arg -> 'e arg -> 'f arg -> ('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'res, 'res) t
Sourceval (@>>) : ('a, 'b) t -> ('b, 'res) t -> ('a, 'res) t

Right-associative append. This is useful for long lists of types. (p2 int float) @>> (p1 text) is the same as p3 int float text, which is the same as int @> float @> text @> nil.

Sourceval id : 'a -> 'a

Empty list of arguments

Sourceval mkp2 : 'a -> 'b -> 'a * 'b

Make a tuple. Useful in, for example, Ty.( p2 int text, mkp2).

Sourceval mkp3 : 'a -> 'b -> 'c -> 'a * 'b * 'c
Sourceval mkp4 : 'a -> 'b -> 'c -> 'd -> 'a * 'b * 'c * 'd
Sourceval mkp5 : 'a -> 'b -> 'c -> 'd -> 'e -> 'a * 'b * 'c * 'd * 'e
Sourceval mkp6 : 'a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'a * 'b * 'c * 'd * 'e * 'f
OCaml

Innovation. Community. Security.