Merge branch 'boechat107-typehint'
This commit is contained in:
commit
c54f70350e
1 changed files with 3 additions and 2 deletions
|
|
@ -167,10 +167,11 @@
|
||||||
(merge m { :limit per-page :skip (monger.internal.pagination/offset-for page per-page) }))
|
(merge m { :limit per-page :skip (monger.internal.pagination/offset-for page per-page) }))
|
||||||
|
|
||||||
(defmacro with-collection
|
(defmacro with-collection
|
||||||
[^DB db ^String coll & body]
|
[db coll & body]
|
||||||
`(let [coll# ~coll
|
`(let [coll# ~coll
|
||||||
|
^DB db# ~db
|
||||||
db-coll# (if (string? coll#)
|
db-coll# (if (string? coll#)
|
||||||
(.getCollection ~db ^String coll#)
|
(.getCollection db# coll#)
|
||||||
coll#)
|
coll#)
|
||||||
query# (-> (empty-query db-coll#) ~@body)]
|
query# (-> (empty-query db-coll#) ~@body)]
|
||||||
(exec query#)))
|
(exec query#)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue