Trait/Object

reactivemongo.api.gridfs

GridFS

Related Docs: object GridFS | package gridfs

Permalink

sealed trait GridFS[P <: SerializationPack] extends GridFSCompat with PackSupport[P] with InsertCommand[P] with DeleteCommand[P] with UpdateCommand[P] with UpdateWriteResultFactory[P] with UpsertedFactory[P] with CommandCodecsWithPack[P] with QueryBuilderFactory[P]

A GridFS store.

Self Type
GridFS[P]
Linear Supertypes
QueryBuilderFactory[P], HintFactory[P], CommandCodecsWithPack[P], UpsertedFactory[P], UpdateWriteResultFactory[P], UpdateCommand[P], DeleteCommand[P], InsertCommand[P], PackSupport[P], GridFSCompat, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GridFS
  2. QueryBuilderFactory
  3. HintFactory
  4. CommandCodecsWithPack
  5. UpsertedFactory
  6. UpdateWriteResultFactory
  7. UpdateCommand
  8. DeleteCommand
  9. InsertCommand
  10. PackSupport
  11. GridFSCompat
  12. AnyRef
  13. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final type DeleteCmd = ResolvedCollectionCommand[Delete]

    Permalink
    Attributes
    protected[reactivemongo]
    Definition Classes
    DeleteCommand
  2. final class DeleteElement extends AnyRef

    Permalink

    Delete command element

    Delete command element

    Definition Classes
    DeleteCommand
  3. final type DeleteResult = DefaultWriteResult

    Permalink

    Result for a delete command

    Result for a delete command

    Definition Classes
    DeleteCommand
  4. type FileToSave[Id <: P.Value] = gridfs.FileToSave[Id, P.Document]

    Permalink
  5. sealed trait Hint extends AnyRef

    Permalink

    An index hint

    An index hint

    Definition Classes
    HintFactory
  6. final class QueryBuilder extends AnyRef

    Permalink

    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.

    Definition Classes
    QueryBuilderFactory
  7. type ReadFile[+Id <: P.Value] = gridfs.ReadFile[Id, P.Document]

    Permalink
  8. final type UpdateCmd = ResolvedCollectionCommand[Update]

    Permalink
    Attributes
    protected[reactivemongo]
    Definition Classes
    UpdateCommand
  9. final class UpdateElement extends AnyRef

    Permalink

    Definition Classes
    UpdateCommand
  10. final class UpdateWriteResult extends WriteResult

    Permalink

    Result for the update operations.

    Result for the update operations.

    Definition Classes
    UpdateWriteResultFactory
  11. final class Upserted extends AnyRef

    Permalink

    An upserted element

    An upserted element

    Definition Classes
    UpsertedFactory

Abstract Value Members

  1. abstract def db: DB with DBMetaCommands

    Permalink
    Attributes
    protected
  2. abstract val pack: P

    Permalink

    The serialization pack (BSON by default).

    The serialization pack (BSON by default).

    Used to resolve the types of values (by default BSONValue, BSONDocument, ...), and the related typeclasses (e.g. BSONDocumentReader ...).

    Definition Classes
    PackSupport
  3. abstract def prefix: String

    Permalink
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to any2stringadd[GridFS[P]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (GridFS[P], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to ArrowAssoc[GridFS[P]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. object Upserted

    Permalink
    Definition Classes
    UpsertedFactory
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def chunks(file: ReadFile[P.Value], readPreference: ReadPreference = defaultReadPreference)(implicit cp: CursorProducer[Array[Byte]]): ProducedCursor

    Permalink

    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.

    file

    the file to be read

  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def concat[T](a1: Array[T], a2: Array[T])(implicit m: Manifest[T]): Array[T]

    Permalink
    Attributes
    protected
    Definition Classes
    GridFSCompat
  11. final def deleteWriter(session: Option[Session]): P.Writer[DeleteCmd]

    Permalink
    Attributes
    protected
    Definition Classes
    DeleteCommand
  12. implicit final lazy val deleteWriter: P.Writer[DeleteCmd]

    Permalink
    Attributes
    protected[reactivemongo]
    Definition Classes
    DeleteCommand
  13. def ensureIndex()(implicit ec: ExecutionContext): Future[Boolean]

    Permalink

    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.

    returns

    A future containing true if the index was created, false if it already exists.

    Annotations
    @SuppressWarnings()
  14. def ensuring(cond: (GridFS[P]) ⇒ Boolean, msg: ⇒ Any): GridFS[P]

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to Ensuring[GridFS[P]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (GridFS[P]) ⇒ Boolean): GridFS[P]

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to Ensuring[GridFS[P]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): GridFS[P]

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to Ensuring[GridFS[P]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): GridFS[P]

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to Ensuring[GridFS[P]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  20. def exists(implicit ec: ExecutionContext): Future[Boolean]

    Permalink

    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.

    Annotations
    @SuppressWarnings()
  21. def fileToSave[Id <: P.Value](filename: Option[String], contentType: Option[String], uploadDate: Option[Long], metadata: P.Document, id: Id): FileToSave[Id]

    Permalink

    Prepare the information to save a file.

  22. def fileToSave(filename: Option[String] = None, contentType: Option[String] = None, uploadDate: Option[Long] = None, metadata: P.Document = document(Seq.empty)): FileToSave[P.Value]

    Permalink

    Prepare the information to save a file.

    Prepare the information to save a file. The unique ID is automatically generated.

  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def find(selector: P.Document)(implicit cp: CursorProducer[ReadFile[P.Value]]): ProducedCursor

    Permalink

    Finds the files matching the given selector.

    Finds the files matching the given selector.

    selector

    the query to find the files

  25. def find[S, Id <: P.Value](selector: S)(implicit w: P.Writer[S], r: FileReader[Id], cp: CursorProducer[ReadFile[Id]]): ProducedCursor

    Permalink

    Finds the files matching the given selector.

    Finds the files matching the given selector.

    S

    The type of the selector document. An implicit Writer[S] must be in the scope.

    Id

    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
    selector

    the query to find the files

    r

    fileReader a file reader automatically resolved if Id is a valid value

  26. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to StringFormat[GridFS[P]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def hint(specification: P.Document): Hint

    Permalink

    Returns a hint for the given index specification document.

    Returns a hint for the given index specification document.

    specification

    the index specification document

    Definition Classes
    HintFactory
  30. def hint(name: String): Hint

    Permalink

    Returns a hint for the given index name.

    Returns a hint for the given index name.

    name

    the index name

    Definition Classes
    HintFactory
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. lazy val maxWireVersion: MongoWireVersion

    Permalink
    Attributes
    protected
    Definition Classes
    GridFS → UpdateCommand
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. def readToOutputStream[Id <: P.Value](file: ReadFile[Id], out: OutputStream, readPreference: ReadPreference = defaultReadPreference)(implicit ec: ExecutionContext): Future[Unit]

    Permalink

    Reads the given file and writes its contents to the given OutputStream.

    Reads the given file and writes its contents to the given OutputStream.

    file

    the file to be read

  37. def remove[Id <: P.Value](id: Id)(implicit ec: ExecutionContext): Future[WriteResult]

    Permalink

    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.

    id

    the file id to remove from this store

  38. implicit final lazy val resultReader: P.Reader[DefaultWriteResult]

    Permalink
    Attributes
    protected
    Definition Classes
    CommandCodecsWithPack
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    GridFS → AnyRef → Any
  41. def update[Id <: P.Value](id: Id, metadata: P.Document)(implicit ec: ExecutionContext): Future[WriteResult]

    Permalink

    Updates the metadata document for the specified file.

    Updates the metadata document for the specified file.

    id

    the id of the file to be updated

    metadata

    the file new metadata

  42. implicit final def updateReader: P.Reader[UpdateWriteResult]

    Permalink
    Attributes
    protected
    Definition Classes
    UpdateCommand
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def writeElement(builder: Builder[pack.type]): (UpdateElement) ⇒ P.Document

    Permalink
    Attributes
    protected[reactivemongo]
    Definition Classes
    UpdateCommand
  47. def writeFromInputStream[Id <: P.Value](file: FileToSave[Id], input: InputStream, chunkSize: Int = 262144)(implicit ec: ExecutionContext): Future[ReadFile[Id]]

    Permalink

    Writes the data provided by the given InputStream to the given file.

  48. def [B](y: B): (GridFS[P], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from GridFS[P] to ArrowAssoc[GridFS[P]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from QueryBuilderFactory[P]

Inherited from HintFactory[P]

Inherited from CommandCodecsWithPack[P]

Inherited from UpsertedFactory[P]

Inherited from UpdateWriteResultFactory[P]

Inherited from UpdateCommand[P]

Inherited from DeleteCommand[P]

Inherited from InsertCommand[P]

Inherited from PackSupport[P]

Inherited from GridFSCompat

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from GridFS[P] to any2stringadd[GridFS[P]]

Inherited by implicit conversion StringFormat from GridFS[P] to StringFormat[GridFS[P]]

Inherited by implicit conversion Ensuring from GridFS[P] to Ensuring[GridFS[P]]

Inherited by implicit conversion ArrowAssoc from GridFS[P] to ArrowAssoc[GridFS[P]]

Ungrouped