ensure-valid-collection-name ( collection -- )


Vocabulary
mongodb.driver.private

Inputs
collectionan object


Outputs
None

Definition


: ensure-valid-collection-name ( collection -- )
[
[ ";$." intersect length 0 > ] keep [
"contains invalid characters ( . $ ; )" ":" glue
throw
] curry when
] [
[ ascii? ] all? [
"collection names must only contain ascii characters"
throw
] unless
] bi ; inline