The “collection” Object
The following methods exist on the collection object (returned by db.name):
Collection
- collection.checksum()
- collection.compact()
- collection.count()
- collection.drop()
- collection.figures(details)
- collection.getResponsibleShard()
- collection.load()
- collection.properties(options)
- collection.revision()
- collection.shards(details)
- collection.toArray()
- collection.truncate()
- collection.type()
- collection.unload()
Indexes
- collection.dropIndex(index)
- collection.ensureIndex(description)
- collection.getIndexes(name)
- collection.indexes(name)
- collection.index(index)
Document
- collection.all()
- collection.any()
- collection.byExample(example)
- collection.document(object)
- collection.documents(keys)
- collection.edges(vertex-id)
- collection.exists(object)
- collection.firstExample(example)
- collection.inEdges(vertex-id)
- collection.insert(data)
- collection.edges(vertices)
- collection.iterate(iterator,options)
- collection.outEdges(vertex-id)
- collection.remove(selector)
- collection.removeByExample(example)
- collection.removeByKeys(keys)
- collection.rename()
- collection.replace(selector, data)
- collection.replaceByExample(example, data)
- collection.save(data)
- collection.update(selector, data)
- collection.updateByExample(example, data)