c

io.scalajs.npm.mongodb.gridfs

GridFSBucket

class GridFSBucket extends Object

GridFS Bucket

Annotations
@RawJSType() @native() @JSImport( "mongodb" , "GridFSBucket" )
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GridFSBucket
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GridFSBucket(db: Db, options: |[GridFSOptions, RawOptions] = js.native)

    Constructor for a streaming GridFS interface

    Constructor for a streaming GridFS interface

    db

    the Db

    options

    the options

    returns

    a new GridFSBucket

  2. new GridFSBucket()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def delete(id: ObjectID, callback: MongoCallback0 = js.native): Promise[Unit]

    Deletes a file with the given id

    Deletes a file with the given id

    id

    the id of the file doc

    callback

    the optional callback function

    returns

    a completion promise if no callback function was passed

    Example:
    1. delete(id[, callback])

  7. def drop(callback: MongoCallback0 = js.native): Promise[Unit]

    Removes this bucket's files collection, followed by its chunks collection.

    Removes this bucket's files collection, followed by its chunks collection.

    callback

    the optional callback function

    returns

    a completion promise if no callback function was passed

    Example:
    1. drop(callback)

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def find[T](filter: Any, options: |[GridFSBucketFindOptions, RawOptions] = js.native): Cursor[T]

    Convenience wrapper around find on the files collection

    Convenience wrapper around find on the files collection

    Example:
    1. find(filter, options)

  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  13. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. def openDownloadStream(id: |[|[ObjectID, String], Int], options: |[DownloadStreamOptions, RawOptions] = js.native): GridFSBucketReadStream

    Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS.

    Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS.

    id

    the id of the file document

    options

    the download options

    Example:
    1. openDownloadStream(id, options)

  21. def openDownloadStreamByName(filename: String, options: |[DownloadStreamByNameOptions, RawOptions] = js.native): GridFSBucketReadStream

    Returns a readable stream (GridFSBucketReadStream) for streaming the file with the given name from GridFS.

    Returns a readable stream (GridFSBucketReadStream) for streaming the file with the given name from GridFS. If there are multiple files with the same name, this will stream the most recent file with the given name (as determined by the uploadDate field). You can set the revision option to change this behavior.

    filename

    the name of the file to download

    options

    the download options

    Example:
    1. bucket.openDownloadStreamByName('meistersinger.mp3')

  22. def openUploadStream(filename: String, options: |[UploadStreamOptions, RawOptions] = js.native): GridFSBucketWriteStream

    Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS.

    Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS. The stream's 'id' property contains the resulting file's id.

    filename

    the name of the file to download

    options

    the upload options

    returns

    a GridFSBucketWriteStream

    Example:
    1. bucket.openUploadStream('./meistersinger.mp3')

  23. def openUploadStreamWithId(id: |[|[ObjectID, String], Int], filename: String, options: |[UploadStreamOptions, RawOptions] = js.native): GridFSBucketWriteStream

    Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS for a custom file id.

    Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting file's id.

    id

    A custom id used to identify the file

    filename

    The value of the 'filename' key in the files doc

    options

    Optional settings.

    returns

    a GridFSBucketWriteStream

  24. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toLocaleString(): String
    Definition Classes
    Object
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. def valueOf(): Any
    Definition Classes
    Object
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped