diff options
Diffstat (limited to 'lib/query/encoder.ml')
| -rw-r--r-- | lib/query/encoder.ml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/query/encoder.ml b/lib/query/encoder.ml index ae34c3e..6897ec7 100644 --- a/lib/query/encoder.ml +++ b/lib/query/encoder.ml @@ -204,19 +204,18 @@ let rec list_to_tup : f:('a -> t_type) -> 'a list -> t = T (T_N (v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, tl)) module CaqtiRequest = Map (struct - include Caqti_type + include Caqti.Template.Row_type type env = unit - let t_n = Caqti_type.t11 + let t_n = t11 - let f : type a. unit -> a data -> a Caqti_type.t = + let f : type a. unit -> a data -> a t = fun () -> function - | { content_type = Text; _ } -> Caqti_type.option @@ Caqti_type.string - | { content_type = Integer; _ } -> Caqti_type.option @@ Caqti_type.int64 - | { content_type = MultiReference _; _ } -> Caqti_type.int64 - | { content_type = MonoReference _; _ } -> - Caqti_type.option @@ Caqti_type.int64 + | { content_type = Text; _ } -> option string + | { content_type = Integer; _ } -> option int64 + | { content_type = MultiReference _; _ } -> int64 + | { content_type = MonoReference _; _ } -> option int64 end) module DefaultEncoder = struct |
