Remove type hints that can be inferred by the compiler, part 1
This commit is contained in:
parent
91d967b592
commit
423b80774a
1 changed files with 22 additions and 22 deletions
|
|
@ -46,17 +46,17 @@
|
||||||
(monger.collection/insert \"people\" { :name \"Joe\", :age 30, WriteConcern/SAFE })
|
(monger.collection/insert \"people\" { :name \"Joe\", :age 30, WriteConcern/SAFE })
|
||||||
"
|
"
|
||||||
([^String collection document]
|
([^String collection document]
|
||||||
(.insert ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.insert (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^DBObject (to-db-object document)
|
(to-db-object document)
|
||||||
^WriteConcern monger.core/*mongodb-write-concern*))
|
^WriteConcern monger.core/*mongodb-write-concern*))
|
||||||
([^String collection document ^WriteConcern concern]
|
([^String collection document ^WriteConcern concern]
|
||||||
(.insert ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.insert (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^DBObject (to-db-object document)
|
(to-db-object document)
|
||||||
concern))
|
concern))
|
||||||
([^DB db ^String collection document ^WriteConcern concern]
|
([^DB db ^String collection document ^WriteConcern concern]
|
||||||
(.insert ^DBCollection (.getCollection db collection)
|
(.insert (.getCollection db collection)
|
||||||
^DBObject (to-db-object document)
|
(to-db-object document)
|
||||||
concern)))
|
concern)))
|
||||||
|
|
||||||
|
|
||||||
(defn ^WriteResult insert-batch
|
(defn ^WriteResult insert-batch
|
||||||
|
|
@ -70,15 +70,15 @@
|
||||||
|
|
||||||
"
|
"
|
||||||
([^String collection ^List documents]
|
([^String collection ^List documents]
|
||||||
(.insert ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.insert (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^List (to-db-object documents)
|
^List (to-db-object documents)
|
||||||
^WriteConcern monger.core/*mongodb-write-concern*))
|
^WriteConcern monger.core/*mongodb-write-concern*))
|
||||||
([^String collection ^List documents ^WriteConcern concern]
|
([^String collection ^List documents ^WriteConcern concern]
|
||||||
(.insert ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.insert (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^List (to-db-object documents)
|
^List (to-db-object documents)
|
||||||
concern))
|
concern))
|
||||||
([^DB db ^String collection ^List documents ^WriteConcern concern]
|
([^DB db ^String collection ^List documents ^WriteConcern concern]
|
||||||
(.insert ^DBCollection (.getCollection db collection)
|
(.insert (.getCollection db collection)
|
||||||
^List (to-db-object documents)
|
^List (to-db-object documents)
|
||||||
concern)))
|
concern)))
|
||||||
|
|
||||||
|
|
@ -102,18 +102,18 @@
|
||||||
(mgcol/find \"people\" { :company \"Comp Corp\"} [:first_name :last_name])
|
(mgcol/find \"people\" { :company \"Comp Corp\"} [:first_name :last_name])
|
||||||
"
|
"
|
||||||
([^String collection]
|
([^String collection]
|
||||||
(.find ^DBCollection (.getCollection monger.core/*mongodb-database* collection)))
|
(.find (.getCollection monger.core/*mongodb-database* collection)))
|
||||||
([^String collection ^Map ref]
|
([^String collection ^Map ref]
|
||||||
(.find ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.find (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^DBObject (to-db-object ref)))
|
(to-db-object ref)))
|
||||||
([^String collection ^Map ref fields]
|
([^String collection ^Map ref fields]
|
||||||
(.find ^DBCollection (.getCollection monger.core/*mongodb-database* collection)
|
(.find (.getCollection monger.core/*mongodb-database* collection)
|
||||||
^DBObject (to-db-object ref)
|
(to-db-object ref)
|
||||||
^DBObject (as-field-selector fields)))
|
(as-field-selector fields)))
|
||||||
([^DB db ^String collection ^Map ref fields]
|
([^DB db ^String collection ^Map ref fields]
|
||||||
(.find ^DBCollection (.getCollection db collection)
|
(.find (.getCollection db collection)
|
||||||
^DBObject (to-db-object ref)
|
(to-db-object ref)
|
||||||
^DBObject (as-field-selector fields))))
|
(as-field-selector fields))))
|
||||||
|
|
||||||
(defn find-maps
|
(defn find-maps
|
||||||
"Queries for objects in this collection.
|
"Queries for objects in this collection.
|
||||||
|
|
@ -489,7 +489,7 @@
|
||||||
|
|
||||||
"
|
"
|
||||||
[^String collection]
|
[^String collection]
|
||||||
(from-db-object (.getIndexInfo ^DBCollection (.getCollection monger.core/*mongodb-database* collection)) true))
|
(from-db-object (.getIndexInfo (.getCollection monger.core/*mongodb-database* collection)) true))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue