Handbook
Glossary
mdb-collection
Vocabulary
mongodb
.
driver
Variable description
MongoDB collection
Definition
USING:
kernel
math
strings
;
IN:
mongodb.driver
TUPLE:
mdb-collection
{
name
string
initial:
""
}
{
capped
boolean
initial:
f
}
{
size
integer
initial:
0
}
{
max
integer
initial:
0
}
;
Methods
USING:
accessors
combinators
kernel
mongodb.driver
mongodb.tuple.collection
;
M:
mdb-collection
<mdb-tuple-collection>
[
name>>
<mdb-tuple-collection>
]
keep
{
[
capped>>
>>capped
]
[
size>>
>>size
]
[
max>>
>>max
]
}
cleave
;
USING:
accessors
assocs
combinators
kernel
mongodb.cmd
mongodb.connection
mongodb.driver
;
M:
mdb-collection
create-collection
create-cmd
make-cmd
over
{
[
name>>
"create"
set-cmd-opt
]
[
capped>>
[
"capped"
set-cmd-opt
]
when*
]
[
max>>
[
"max"
set-cmd-opt
]
when*
]
[
size>>
[
"size"
set-cmd-opt
]
when*
]
}
cleave
send-cmd
check-ok
[
drop
[
]
[
name>>
]
bi
mdb-instance
collections>>
set-at
]
[
throw
]
if
;
USING:
accessors
assocs
mongodb.driver
mongodb.tuple.collection
sequences
;
M:
mdb-collection
mdb-index-map
classes>>
[
mdb-index-map
]
map
assoc-union-all
;
USING:
accessors
assocs
mongodb.driver
mongodb.tuple.collection
sequences
;
M:
mdb-collection
mdb-slot-map
classes>>
[
mdb-slot-map
]
map
assoc-union-all
;
USING:
accessors
mongodb.driver
;
M:
mdb-collection
validate.
name>>
validate.
;