2025-09-13 15:56:19 +02:00
|
|
|
type sign =
|
|
|
|
|
| Sign_plus
|
|
|
|
|
| Sign_minus
|
|
|
|
|
|
|
|
|
|
type t = private {
|
|
|
|
|
sign: sign option;
|
|
|
|
|
currency: string;
|
|
|
|
|
value: Int64.t;
|
|
|
|
|
fraction: Int32.t;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val make :
|
|
|
|
|
sign:sign option ->
|
|
|
|
|
currency:string ->
|
|
|
|
|
value:Int64.t ->
|
|
|
|
|
fraction:Int32.t ->
|
|
|
|
|
(t, string) result
|
|
|
|
|
|
2026-03-03 10:45:39 +01:00
|
|
|
(* fail on differents currencies *)
|
|
|
|
|
val compare : t -> t -> int
|
2026-03-11 14:17:52 +01:00
|
|
|
|
|
|
|
|
(* TODO rename pp_dump *)
|
2025-09-13 15:56:19 +02:00
|
|
|
val pp : Format.formatter -> t -> unit
|
|
|
|
|
val to_string : t -> string
|
|
|
|
|
val of_string : string -> (t, string) result
|
|
|
|
|
|
2026-02-11 00:06:28 +01:00
|
|
|
(* - *)
|
|
|
|
|
val jsont : t Jsont.t
|
2025-09-13 15:56:19 +02:00
|
|
|
val bin : t Bin.t
|
2026-02-11 00:06:28 +01:00
|
|
|
(* [caqti] is in pg_type.ml *)
|