Cosmetics
This commit is contained in:
parent
e8b5ba5dd6
commit
59427e29bb
1 changed files with 3 additions and 23 deletions
|
|
@ -43,19 +43,7 @@
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
:host (\"127.0.0.1\" by default)
|
:host (\"127.0.0.1\" by default)
|
||||||
:port (27017 by default)
|
:port (27017 by default)"
|
||||||
|
|
||||||
EXAMPLES
|
|
||||||
|
|
||||||
(monger.core/connect)
|
|
||||||
(monger.core/connect {:host \"db3.intranet.local\" :port 27787})
|
|
||||||
|
|
||||||
;; Connecting to a replica set with a couple of seeds
|
|
||||||
(let [^MongoClientOptions opts (mg/mongo-options :threads-allowed-to-block-for-connection-multiplier 300)
|
|
||||||
seeds [[\"192.168.1.1\" 27017] [\"192.168.1.2\" 27017] [\"192.168.1.1\" 27018]]
|
|
||||||
sas (map #(apply mg/server-address %) seeds)]
|
|
||||||
(mg/connect! sas opts))
|
|
||||||
"
|
|
||||||
{:arglists '([]
|
{:arglists '([]
|
||||||
[server-address options]
|
[server-address options]
|
||||||
[[server-address & more] options]
|
[[server-address & more] options]
|
||||||
|
|
@ -80,11 +68,7 @@
|
||||||
|
|
||||||
|
|
||||||
(defn ^DB get-db
|
(defn ^DB get-db
|
||||||
"Get database reference by name.
|
"Get database reference by name."
|
||||||
|
|
||||||
EXAMPLES
|
|
||||||
|
|
||||||
(monger.core/get-db connection \"myapp_production\")"
|
|
||||||
[^MongoClient conn ^String name]
|
[^MongoClient conn ^String name]
|
||||||
(.getDB conn name))
|
(.getDB conn name))
|
||||||
|
|
||||||
|
|
@ -94,11 +78,7 @@
|
||||||
(.dropDatabase conn db))
|
(.dropDatabase conn db))
|
||||||
|
|
||||||
(defn ^GridFS get-gridfs
|
(defn ^GridFS get-gridfs
|
||||||
"Get GridFS for the given database.
|
"Get GridFS for the given database."
|
||||||
|
|
||||||
EXAMPLES
|
|
||||||
|
|
||||||
(monger.core/get-gridfs connection \"myapp_production\")"
|
|
||||||
[^MongoClient conn ^String name]
|
[^MongoClient conn ^String name]
|
||||||
(GridFS. (.getDB conn name)))
|
(GridFS. (.getDB conn name)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue