GoLang MongoGridFS::__construct

request it (224)
GoLang replacement for PHP's MongoGridFS::__construct [edit | history]



Do you know a GoLang replacement for PHP's MongoGridFS::__construct? Write it!

PHP MongoGridFS::__construct

PHP original manual for MongoGridFS::__construct [ show | php.net ]

MongoGridFS::__construct

(PECL mongo >=0.9.0)

MongoGridFS::__constructCreates new file collections

Description

public MongoGridFS::__construct ( MongoDB $db [, string $prefix = "fs" [, mixed $chunks = "fs" ]] )

Files as stored across two collections, the first containing file meta information, the second containing chunks of the actual file. By default, fs.files and fs.chunks are the collection names used.

Use one argument to specify a prefix other than "fs":

$fs = new MongoGridFS($db, "myfiles");
uses myfiles.files and myfiles.chunks collections.

Parameters

db

Database.

files

Optional collection name prefix.