Handbook
Glossary
check-collection ( collection -- fq-collection )
Vocabulary
mongodb
.
driver
.
private
Inputs
collection
an
object
Outputs
fq-collection
an
object
Definition
USING:
accessors
kernel
locals.backend
mongodb.connection
mongodb.driver
sequences
splitting
;
IN:
mongodb.driver.private
:
check-collection
( collection -- fq-collection )
mdb-instance
load-local
0
get-local
name>>
load-local
dup
mdb-collection?
[
name>>
]
when
"."
split1
over
0
get-local
=
[
nip
]
[
drop
]
if
[
]
[
reserved-namespace?
]
bi
-1
get-local
[
load-local
0
get-local
(ensure-collection)
1
drop-locals
]
curry
unless
0
get-local
[
load-local
0
get-local
1
drop-locals
]
curry
dip
"."
glue
2
drop-locals
;