Cosmetics, wording
This commit is contained in:
parent
8102c42888
commit
900592e302
1 changed files with 4 additions and 6 deletions
|
|
@ -234,12 +234,10 @@
|
||||||
If username and password are provided, performs authentication."
|
If username and password are provided, performs authentication."
|
||||||
[^String uri-string]
|
[^String uri-string]
|
||||||
(let [uri (MongoClientURI. uri-string)
|
(let [uri (MongoClientURI. uri-string)
|
||||||
conn (MongoClient. uri)
|
conn (MongoClient. uri)]
|
||||||
dbName (.getDatabase uri)]
|
(if-let [dbName (.getDatabase uri)]
|
||||||
(if (not dbName)
|
{:conn conn :db (.getDB conn dbName)}
|
||||||
(throw (IllegalArgumentException. "No database name specified in uri"))
|
(throw (IllegalArgumentException. "No database name specified in URI. Monger requires a database to be explicitly configured.")))))
|
||||||
(let [db (.getDB conn dbName)]
|
|
||||||
{:conn conn :db db}))))
|
|
||||||
|
|
||||||
(defn ^com.mongodb.CommandResult command
|
(defn ^com.mongodb.CommandResult command
|
||||||
"Runs a database command (please check MongoDB documentation for the complete list of commands).
|
"Runs a database command (please check MongoDB documentation for the complete list of commands).
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue