30 lines
544 B
OCaml
30 lines
544 B
OCaml
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
|
|
|
|
(* fail on differents currencies *)
|
|
val compare : t -> t -> int
|
|
|
|
(* TODO rename pp_dump *)
|
|
val pp : Format.formatter -> t -> unit
|
|
val to_string : t -> string
|
|
val of_string : string -> (t, string) result
|
|
|
|
(* - *)
|
|
val jsont : t Jsont.t
|
|
val bin : t Bin.t
|
|
(* [caqti] is in pg_type.ml *)
|