Rust

暂时就写个 hello, world

logo

hello, world

1
2
3
4
5
6
fn main() {
// The statements here will be executed when the compiled binary is called
// Print text to the console
println!("Hello World!");
}
Anywhere
import { Mongo } from 'meteor/mongo'
(mongo/collection.js, line 27)

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.

defineMutationMethods Boolean

Set to false to skip setting up the mutation methods that enable insert/update/remove from client code. Default true.

Edit on GitHub