package mysql_protocol

  1. Overview
  2. Docs
type sign =
  1. | Positive
  2. | Negative
type sql = private
  1. | Null
  2. | Tinyint of int
  3. | Smallint of int
  4. | Int of int
  5. | Longint of Int64.t
  6. | Longlongint of Big_int.big_int
  7. | Decimal of Num.num
  8. | Date of int * int * int
  9. | Time of sign * int * int * int * Int64.t
  10. | Datetime of (int * int * int) * (int * int * int * Int64.t)
  11. | Timestamp of (int * int * int) * (int * int * int * Int64.t)
  12. | Float of float
  13. | Double of float
  14. | Int24 of int
  15. | Year of int
  16. | Varchar of string
  17. | String of string
  18. | Varstring of string
  19. | Blob of Buffer.t
  20. | Binary of Buffer.t
  21. | Varbinary of Buffer.t
  22. | Enum of string
  23. | Set of string
  24. | Bit of Bitstring.t
  25. | Geometry of Bitstring.t
type t = sql
exception Wrong_type of string
val data_null : t
val data_tinyint : int -> t
val data_smallint : int -> t
val data_int : int -> t
val data_longint : Int64.t -> t
val data_longlongint : Big_int.big_int -> t
val data_decimal : Num.num -> t
val data_date : (int * int * int) -> t
val data_time : (sign * int * int * int * Int64.t) -> t
val data_datetime : ((int * int * int) * (int * int * int * Int64.t)) -> t
val data_timestamp : ((int * int * int) * (int * int * int * Int64.t)) -> t
val data_float : float -> t
val data_double : float -> t
val data_int24 : int -> t
val data_year : int -> t
val data_varchar : string -> t
val data_string : string -> t
val data_varstring : string -> t
val data_blob : Buffer.t -> t
val data_binary : Buffer.t -> t
val data_varbinary : Buffer.t -> t
val data_enum : string -> t
val data_set : string -> t
val data_bit : Bitstring.t -> t
val data_geometry : Bitstring.t -> t
val to_ocaml_int : t -> int option
val to_ocaml_int64 : t -> Int64.t option
val to_ocaml_big_int : t -> Big_int.big_int option
val to_ocaml_num : t -> Num.num option
val to_ocaml_date : t -> (int * int * int) option
val to_ocaml_time : t -> (sign * int * int * int * Int64.t) option
val to_ocaml_dt_ts : t -> ((int * int * int) * (int * int * int * Int64.t)) option
val to_ocaml_float : t -> float option
val to_ocaml_string : t -> string option
val to_ocaml_buffer : t -> Buffer.t option
val to_ocaml_bitstring : t -> Bitstring.t option
val eq : t -> t -> bool
val type_to_string : t -> string
val to_string : t -> string option
OCaml

Innovation. Community. Security.