Class/Object

io.scalajs.npm.mongodb.gridfs

GridStore

Related Docs: object GridStore | package gridfs

Permalink

class GridStore extends Object with IEventEmitter

Grid Store

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

Instance Constructors

  1. new GridStore(db: Db, id: ObjectID, filename: String, mode: String)

    Permalink
  2. new GridStore(db: Db, id: ObjectID, mode: String)

    Permalink
  3. new GridStore(db: Db, filename: String, mode: String, options: GridStoreOptions)

    Permalink
  4. new GridStore(db: Db, filename: String, mode: String)

    Permalink
  5. new GridStore(db: Db, id: UndefOr[ObjectID] = js.native, filename: UndefOr[String] = js.native, mode: String, options: UndefOr[GridStoreOptions] = js.native)

    Permalink

    db

    A database instance to interact with.

    id

    optional unique id for this file

    filename

    optional filename for this file, no unique constrain on the field

    mode

    sets the mode for this file.

    options

    optional properties to specify.

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addListener(eventName: String, listener: Function): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def chunkCollection(callback: Function): Unit

    Permalink

    Retrieve this file’s chunks collection.

  7. var chunkSize: Integer

    Permalink

    Returns the current chunk size of the file.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def close(callback: Function): Unit

    Permalink

    Saves this file to the database.

    Saves this file to the database. This will overwrite the old entry if it already exists. This will work properly only if mode was initialized to “w” or “w+”.

  10. def collection(callback: Function): Unit

    Permalink

    Retrieves the file collection associated with this object.

  11. val db: Db

    Permalink

    A database instance to interact with.

  12. var domain: String

    Permalink
    Definition Classes
    IEventEmitter
  13. def emit(name: String, args: Any*): Any

    Permalink
    Definition Classes
    IEventEmitter
  14. def eof(): Boolean

    Permalink

    Verify if the file is at EOF.

  15. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. val filename: UndefOr[String]

    Permalink

    optional filename for this file, no unique constrain on the field

  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getMaxListeners(): Int

    Permalink
    Definition Classes
    IEventEmitter
  21. def getc(callback: Function): Unit

    Permalink

    Retrieves a single character from this file.

  22. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. val id: UndefOr[ObjectID]

    Permalink

    optional unique id for this file

  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  27. def listenerCount(eventName: String): Int

    Permalink
    Definition Classes
    IEventEmitter
  28. def listeners(eventName: String): Array[Function]

    Permalink
    Definition Classes
    IEventEmitter
  29. var md5: Integer

    Permalink

    The md5 checksum for this file.

  30. val mode: String

    Permalink

    sets the mode for this file.

  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. def on(eventName: String, listener: Function): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  35. def once(eventName: String, listener: Function): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  36. def open(callback: Function): Unit

    Permalink

    Opens the file from the database and initialize this object.

    Opens the file from the database and initialize this object. Also creates a new one if file does not exist.

  37. val options: UndefOr[GridStoreOptions]

    Permalink

    optional properties to specify.

  38. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  39. def puts(string: String, callback: Function): Unit

    Permalink

    Writes a string to the file with a newline character appended at the end if the given string does not have one.

    Writes a string to the file with a newline character appended at the end if the given string does not have one.

    Example:
    1. puts(string, callback)

  40. def read(callback: Function): Unit

    Permalink

    Retrieves the contents of this file and advances the read/write head.

    Retrieves the contents of this file and advances the read/write head. Works with Buffers only.

    Example:
    1. read([length][, buffer], callback)

  41. def read(buffer: Buffer, callback: Function): Unit

    Permalink

    Retrieves the contents of this file and advances the read/write head.

    Retrieves the contents of this file and advances the read/write head. Works with Buffers only.

    Example:
    1. read([length][, buffer], callback)

  42. def read(length: Int, buffer: Buffer, callback: Function): Unit

    Permalink

    Retrieves the contents of this file and advances the read/write head.

    Retrieves the contents of this file and advances the read/write head. Works with Buffers only.

    Example:
    1. read([length][, buffer], callback)

  43. def readlines(callback: Function): Unit

    Permalink

    Reads the data of this file.

    Reads the data of this file.

    Example:
    1. readlines([separator], callback)

  44. def readlines(separator: String, callback: Function): Unit

    Permalink

    Reads the data of this file.

    Reads the data of this file.

    Example:
    1. readlines([separator], callback)

  45. def removeAllListeners(): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  46. def removeAllListeners(eventName: String): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  47. def removeListener(eventName: String, listener: Function): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  48. def rewind(callback: Function): Unit

    Permalink

    Deletes all the chunks of this file in the database if mode was set to “w” or “w+” and resets the read/write head to the initial position.

  49. def seek(callback: Function): Unit

    Permalink

    Moves the read/write head to a new location.

    Moves the read/write head to a new location. Seek Location Modes:

    • GridStore.IO_SEEK_SET, (default) set the position from the start of the file.
    • GridStore.IO_SEEK_CUR, set the position from the current position in the file.
    • GridStore.IO_SEEK_END, set the position from the end of the file.
    Example:
    1. seek([position][, seekLocation], callback)

  50. def seek(seekLocation: Int, callback: Function): Unit

    Permalink

    Moves the read/write head to a new location.

    Moves the read/write head to a new location. Seek Location Modes:

    • GridStore.IO_SEEK_SET, (default) set the position from the start of the file.
    • GridStore.IO_SEEK_CUR, set the position from the current position in the file.
    • GridStore.IO_SEEK_END, set the position from the end of the file.
    Example:
    1. seek([position][, seekLocation], callback)

  51. def seek(position: Int, seekLocation: Int, callback: Function): Unit

    Permalink

    Moves the read/write head to a new location.

    Moves the read/write head to a new location. Seek Location Modes:

    • GridStore.IO_SEEK_SET, (default) set the position from the start of the file.
    • GridStore.IO_SEEK_CUR, set the position from the current position in the file.
    • GridStore.IO_SEEK_END, set the position from the end of the file.
    Example:
    1. seek([position][, seekLocation], callback)

  52. def setMaxListeners(n: Int): GridStore.this.type

    Permalink
    Definition Classes
    IEventEmitter
  53. def stream(autoclose: Boolean): GridStoreStream

    Permalink

    Returns read stream based on this GridStore file.

    Returns read stream based on this GridStore file.

    autoclose

    if true current GridStore will be closed when EOF and ‘close’ event will be fired

  54. def stream(): GridStoreStream

    Permalink

    Returns read stream based on this GridStore file.

  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  56. def tell(): Promise[Int]

    Permalink

    Retrieves the position of the read/write head of this file.

    Retrieves the position of the read/write head of this file.

    Example:
    1. tell(length, buffer, callback)

  57. def tell(length: Int, buffer: String): Promise[Int]

    Permalink

    Retrieves the position of the read/write head of this file.

    Retrieves the position of the read/write head of this file.

    length

    the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).

    buffer

    a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).

    Example:
    1. tell(length, buffer, callback)

  58. def tell(length: Int, buffer: String, callback: Function2[MongoError, Int, Any]): Unit

    Permalink

    Retrieves the position of the read/write head of this file.

    Retrieves the position of the read/write head of this file.

    length

    the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).

    buffer

    a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).

    callback

    the command callback.

    Example:
    1. tell(length, buffer, callback)

  59. def tell(length: Int, buffer: Buffer): Promise[Int]

    Permalink

    Retrieves the position of the read/write head of this file.

    Retrieves the position of the read/write head of this file.

    length

    the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).

    buffer

    a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).

    Example:
    1. tell(length, buffer, callback)

  60. def tell(length: Int, buffer: Buffer, callback: Function2[MongoError, Int, Any]): Unit

    Permalink

    Retrieves the position of the read/write head of this file.

    Retrieves the position of the read/write head of this file.

    length

    the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).

    buffer

    a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).

    callback

    the command callback.

    Example:
    1. tell(length, buffer, callback)

  61. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  62. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  63. def unlink(callback: Function): Unit

    Permalink

    Deletes all the chunks of this file in the database.

  64. var usingDomains: Boolean

    Permalink
    Definition Classes
    IEventEmitter
  65. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  66. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. def write(data: String, callback: Function): Unit

    Permalink

    Writes some data.

    Writes some data. This method will work properly only if initialized with mode “w” or “w+”.

    Example:
    1. write(data[, close], callback)

  70. def write(data: Buffer, callback: Function): Unit

    Permalink

    Writes some data.

    Writes some data. This method will work properly only if initialized with mode “w” or “w+”.

    Example:
    1. write(data[, close], callback)

  71. def write(data: String, close: Boolean, callback: Function): Unit

    Permalink

    Writes some data.

    Writes some data. This method will work properly only if initialized with mode “w” or “w+”.

    Example:
    1. write(data[, close], callback)

  72. def write(data: Buffer, close: Boolean, callback: Function): Unit

    Permalink

    Writes some data.

    Writes some data. This method will work properly only if initialized with mode “w” or “w+”.

    Example:
    1. write(data[, close], callback)

  73. def writeFile(file: String, callback: Function): Unit

    Permalink

    Stores a file from the file system to the GridFS database.

Inherited from IEventEmitter

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped