Mongo.Collection

Anywhere

new Mongo.Collection(name, [options])

import { Mongo } from 'meteor/mongo' Source

Constructor for a Collection

Arguments

name String

The name of the collection. If null, creates an unmanaged (unsynchronized) local collection.

Options

connection Object

The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling DDP.connect to specify a different server. Pass null to specify no connection. Unmanaged (name is null) collections cannot specify a connection.

idGeneration String

The method of generating the _id fields of new documents in this collection. Possible values:

The default id generation technique is 'STRING'.

transform Function

An optional transformation function. Documents will be passed through this function before being returned from fetch or findOne, and before being passed to callbacks of observe, map, forEach, allow, and deny. Transforms are not applied for the callbacks of observeChanges or to cursors returned from publish functions.

doc_Meteor
2016-05-29 17:21:17
Comments
Leave a Comment

Please login to continue.