Handbook
Glossary
create-collection ( name/collection -- )
Vocabulary
mongodb
.
driver
Inputs
name/collection
collection name
Outputs
None
Word description
Creates a new collection with the given name.
Definition
IN:
mongodb.driver
GENERIC:
create-collection
( name/collection -- )
Methods
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:
mongodb.driver
strings
;
M:
string
create-collection
<mdb-collection>
create-collection
;