An index hint
An index hint
A builder that helps to make a fine-tuned query to MongoDB.
A builder that helps to make a fine-tuned query to MongoDB.
When the query is ready, you can call cursor
to get a Cursor, or one
if you want to retrieve just one document.
Result for the update operations.
Result for the update operations.
Returns a cursor for the chunks of the specified file.
Returns a cursor for the chunks of the specified file. The cursor walks the chunks orderly.
the file to be read
Creates the needed indexes on the GridFS collections
(chunks
and files
).
Creates the needed indexes on the GridFS collections
(chunks
and files
).
Please note that you should really consider reading http://www.mongodb.org/display/DOCS/Indexes before doing this, especially in production.
A future containing true if the index was created, false if it already exists.
Returns whether the data related to this GridFS instance exists on the database.
Returns whether the data related to this GridFS instance exists on the database.
Prepare the information to save a file.
Prepare the information to save a file.
Prepare the information to save a file. The unique ID is automatically generated.
Finds the files matching the given selector.
Finds the files matching the given selector.
the query to find the files
Finds the files matching the given selector.
Finds the files matching the given selector.
The type of the selector document. An implicit Writer[S]
must be in the scope.
the type of the file ID to be read
import scala.concurrent.ExecutionContext import reactivemongo.api.gridfs.GridFS import reactivemongo.api.bson.{ BSONDocument, BSONValue } import reactivemongo.api.bson.collection.{ BSONSerializationPack => Pack } def foo(gfs: GridFS[Pack.type], n: String)(implicit ec: ExecutionContext) = gfs.find[BSONDocument, BSONValue]( BSONDocument("filename" -> n)).headOption
the query to find the files
fileReader a file reader automatically resolved if Id
is a valid value
Returns a hint for the given index specification
document.
Returns a hint for the given index specification
document.
the index specification document
Returns a hint for the given index name
.
Returns a hint for the given index name
.
the index name
Reads the given file and writes its contents to the given OutputStream.
Reads the given file and writes its contents to the given OutputStream.
the file to be read
Removes a file from this store.
Removes a file from this store. Note that if the file does not actually exist, the returned future will not be hold an error.
the file id to remove from this store
Updates the metadata document for the specified file.
Updates the metadata document for the specified file.
the id of the file to be updated
the file new metadata
Writes the data provided by the given InputStream to the given file.
A GridFS store.