sig
  exception Mongo_failed of string
  type t
  val get_db_name : Mongo.t -> string
  val get_collection_name : Mongo.t -> string
  val get_ip : Mongo.t -> string
  val get_port : Mongo.t -> int
  val get_file_descr : Mongo.t -> Unix.file_descr
  val create : string -> int -> string -> string -> Mongo.t
  val create_local_default : string -> string -> Mongo.t
  val destory : Mongo.t -> unit
  val insert : Mongo.t -> Bson.t list -> unit
  val update_one : Mongo.t -> Bson.t * Bson.t -> unit
  val update_all : Mongo.t -> Bson.t * Bson.t -> unit
  val delete_one : Mongo.t -> Bson.t -> unit
  val delete_all : Mongo.t -> Bson.t -> unit
  val find : ?skip:int -> Mongo.t -> MongoReply.t
  val find_one : ?skip:int -> Mongo.t -> MongoReply.t
  val find_of_num : ?skip:int -> Mongo.t -> int -> MongoReply.t
  val find_q : ?skip:int -> Mongo.t -> Bson.t -> MongoReply.t
  val find_q_one : ?skip:int -> Mongo.t -> Bson.t -> MongoReply.t
  val find_q_of_num : ?skip:int -> Mongo.t -> Bson.t -> int -> MongoReply.t
  val find_q_s : ?skip:int -> Mongo.t -> Bson.t -> Bson.t -> MongoReply.t
  val find_q_s_one : ?skip:int -> Mongo.t -> Bson.t -> Bson.t -> MongoReply.t
  val find_q_s_of_num :
    ?skip:int -> Mongo.t -> Bson.t -> Bson.t -> int -> MongoReply.t
  val count : ?skip:int -> ?limit:int -> ?query:Bson.t -> Mongo.t -> int
  val get_more_of_num : Mongo.t -> int64 -> int -> MongoReply.t
  val get_more : Mongo.t -> int64 -> MongoReply.t
  val kill_cursors : Mongo.t -> int64 list -> unit
  type index_option =
      Background of bool
    | Unique of bool
    | Name of string
    | DropDups of bool
    | Sparse of bool
    | ExpireAfterSeconds of int
    | V of int
    | Weight of Bson.t
    | Default_language of string
    | Language_override of string
  val get_indexes : Mongo.t -> MongoReply.t
  val ensure_index : Mongo.t -> Bson.t -> Mongo.index_option list -> unit
  val ensure_simple_index :
    ?options:Mongo.index_option list -> Mongo.t -> string -> unit
  val ensure_multi_simple_index :
    ?options:Mongo.index_option list -> Mongo.t -> string list -> unit
  val drop_index : Mongo.t -> string -> MongoReply.t
  val drop_all_index : Mongo.t -> MongoReply.t
  val change_collection : Mongo.t -> string -> Mongo.t
  val drop_collection : Mongo.t -> MongoReply.t
  val drop_database : Mongo.t -> MongoReply.t
end