sig
exception Mongo_failed of string
type t
val get_db_name : Mongo_lwt.t -> string
val get_collection_name : Mongo_lwt.t -> string
val get_ip : Mongo_lwt.t -> string
val get_port : Mongo_lwt.t -> int
val get_channel_pool :
Mongo_lwt.t -> (Lwt_io.input_channel * Lwt_io.output_channel) Lwt_pool.t
val create :
?max_connection:int ->
string -> int -> string -> string -> Mongo_lwt.t Lwt.t
val create_local_default : string -> string -> Mongo_lwt.t Lwt.t
val destory : Mongo_lwt.t -> unit Lwt.t
val insert : Mongo_lwt.t -> Bson.t list -> unit Lwt.t
val update_one : Mongo_lwt.t -> Bson.t * Bson.t -> unit Lwt.t
val update_all : Mongo_lwt.t -> Bson.t * Bson.t -> unit Lwt.t
val delete_one : Mongo_lwt.t -> Bson.t -> unit Lwt.t
val delete_all : Mongo_lwt.t -> Bson.t -> unit Lwt.t
val find : ?skip:int -> Mongo_lwt.t -> MongoReply.t Lwt.t
val find_one : ?skip:int -> Mongo_lwt.t -> MongoReply.t Lwt.t
val find_of_num : ?skip:int -> Mongo_lwt.t -> int -> MongoReply.t Lwt.t
val find_q : ?skip:int -> Mongo_lwt.t -> Bson.t -> MongoReply.t Lwt.t
val find_q_one : ?skip:int -> Mongo_lwt.t -> Bson.t -> MongoReply.t Lwt.t
val find_q_of_num :
?skip:int -> Mongo_lwt.t -> Bson.t -> int -> MongoReply.t Lwt.t
val find_q_s :
?skip:int -> Mongo_lwt.t -> Bson.t -> Bson.t -> MongoReply.t Lwt.t
val find_q_s_one :
?skip:int -> Mongo_lwt.t -> Bson.t -> Bson.t -> MongoReply.t Lwt.t
val find_q_s_of_num :
?skip:int -> Mongo_lwt.t -> Bson.t -> Bson.t -> int -> MongoReply.t Lwt.t
val count :
?skip:int -> ?limit:int -> ?query:Bson.t -> Mongo_lwt.t -> int Lwt.t
val get_more_of_num : Mongo_lwt.t -> int64 -> int -> MongoReply.t Lwt.t
val get_more : Mongo_lwt.t -> int64 -> MongoReply.t Lwt.t
val kill_cursors : Mongo_lwt.t -> int64 list -> unit Lwt.t
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_lwt.t -> MongoReply.t Lwt.t
val ensure_index :
Mongo_lwt.t -> Bson.t -> Mongo_lwt.index_option list -> unit Lwt.t
val ensure_simple_index :
?options:Mongo_lwt.index_option list ->
Mongo_lwt.t -> string -> unit Lwt.t
val ensure_multi_simple_index :
?options:Mongo_lwt.index_option list ->
Mongo_lwt.t -> string list -> unit Lwt.t
val drop_index : Mongo_lwt.t -> string -> MongoReply.t Lwt.t
val drop_all_index : Mongo_lwt.t -> MongoReply.t Lwt.t
val change_collection : Mongo_lwt.t -> string -> Mongo_lwt.t
val drop_collection : Mongo_lwt.t -> MongoReply.t Lwt.t
val drop_database : Mongo_lwt.t -> MongoReply.t Lwt.t
end