mongo

OCaml driver for MongoDB
Library mongo
Module Mongo
exception Mongo_failed of string
type t
val get_db_name : t -> string
val get_collection_name : t -> string
val get_ip : t -> string
val get_port : t -> int
val get_file_descr : t -> Unix.file_descr
val create : string -> int -> string -> string -> t
val create_local_default : string -> string -> t
val destory : t -> unit
val insert : t -> Bson.t list -> unit
val update_one : ?upsert:bool -> t -> (Bson.t * Bson.t) -> unit
val update_all : ?upsert:bool -> t -> (Bson.t * Bson.t) -> unit
val delete_one : t -> Bson.t -> unit
val delete_all : t -> Bson.t -> unit
val find : ?skip:int -> t -> MongoReply.t
val find_one : ?skip:int -> t -> MongoReply.t
val find_of_num : ?skip:int -> t -> int -> MongoReply.t
val find_q : ?skip:int -> t -> Bson.t -> MongoReply.t
val find_q_one : ?skip:int -> t -> Bson.t -> MongoReply.t
val find_q_of_num : ?skip:int -> t -> Bson.t -> int -> MongoReply.t
val find_q_s : ?skip:int -> t -> Bson.t -> Bson.t -> MongoReply.t
val find_q_s_one : ?skip:int -> t -> Bson.t -> Bson.t -> MongoReply.t
val find_q_s_of_num : ?skip:int -> t -> Bson.t -> Bson.t -> int -> MongoReply.t
val count : ?skip:int -> ?limit:int -> ?query:Bson.t -> t -> int
val get_more_of_num : t -> int64 -> int -> MongoReply.t
val get_more : t -> int64 -> MongoReply.t
val kill_cursors : 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 : t -> MongoReply.t
val ensure_index : t -> Bson.t -> index_option list -> unit
val ensure_simple_index : ?options:index_option list -> t -> string -> unit
val ensure_multi_simple_index : ?options:index_option list -> t -> string list -> unit
val drop_index : t -> string -> MongoReply.t
val drop_all_index : t -> MongoReply.t
val change_collection : t -> string -> t
val drop_collection : t -> MongoReply.t
val drop_database : t -> MongoReply.t