Skip to main content

Home > git-documentdb > GitDocumentDB > collection

GitDocumentDB.collection() method#

Get a collection

Signature:
collection(collectionPath: CollectionPath, options?: CollectionOptions): Collection;

Parameters#

ParameterTypeDescription
collectionPathCollectionPathrelative path from localDir. Sub-directories are also permitted. e.g. 'pages', 'pages/works'.
optionsCollectionOptions
Returns:

Collection

A child collection of GitDocumentDB.rootCollection

Remarks#

  • Notice that this function just read an existing directory. It does not make a new sub-directory.