Handbook
Glossary
count ( mdb-query-msg -- result )
Vocabulary
mongodb
.
driver
Inputs
mdb-query-msg
query
Outputs
result
number of objects in the collection that match the query
Word description
count objects in a collection
Definition
USING:
accessors
assocs
kernel
math
mongodb.cmd
mongodb.connection
;
IN:
mongodb.driver
:
count
( mdb-query-msg -- result )
[
count-cmd
make-cmd
]
dip
[
collection>>
"count"
set-cmd-opt
]
[
query>>
"query"
set-cmd-opt
]
bi
send-cmd
[
check-ok
nip
]
keep
[
[
"n"
]
]
dip
[
at
>fixnum
]
curry
compose
[
f
]
if
;