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)
  2. new GridStore(db: Db, id: ObjectID, mode: String)
  3. new GridStore(db: Db, filename: String, mode: String, options: GridStoreOptions)
  4. new GridStore(db: Db, filename: String, mode: String)
  5. new GridStore(db: Db, id: UndefOr[ObjectID] = js.native, filename: UndefOr[String] = js.native, mode: String, options: UndefOr[GridStoreOptions] = js.native)

    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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addListener(eventName: String, listener: Function): GridStore.this.type
    Definition Classes
    IEventEmitter
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def chunkCollection(callback: Function): Unit

    Retrieve this file’s chunks collection.

  7. var chunkSize: Integer

    Returns the current chunk size of the file.

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

    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

    Retrieves the file collection associated with this object.

  11. val db: Db
  12. val domain: String
    Definition Classes
    IEventEmitter
  13. def emit(name: String, args: Any*): Any
    Definition Classes
    IEventEmitter
  14. def eof(): Boolean

    Verify if the file is at EOF.

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. val filename: UndefOr[String]
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. def getMaxListeners(): Int
    Definition Classes
    IEventEmitter
  21. def getc(callback: Function): Unit

    Retrieves a single character from this file.

  22. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  24. val id: UndefOr[ObjectID]
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  27. def listenerCount(eventName: String): Int
    Definition Classes
    IEventEmitter
  28. def listeners(eventName: String): Array[Function]
    Definition Classes
    IEventEmitter
  29. var md5: Integer

    The md5 checksum for this file.

  30. val mode: String
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  34. def on(eventName: String, listener: Function): GridStore.this.type
    Definition Classes
    IEventEmitter
  35. def once(eventName: String, listener: Function): GridStore.this.type
    Definition Classes
    IEventEmitter
  36. def open(callback: Function): Unit

    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]
  38. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  39. def puts(string: String, callback: Function): Unit

    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

    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

    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

    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

    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

    Reads the data of this file.

    Reads the data of this file.

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

  45. def removeAllListeners(): GridStore.this.type
    Definition Classes
    IEventEmitter
  46. def removeAllListeners(eventName: String): GridStore.this.type
    Definition Classes
    IEventEmitter
  47. def removeListener(eventName: String, listener: Function): GridStore.this.type
    Definition Classes
    IEventEmitter
  48. def rewind(callback: Function): Unit

    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

    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

    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

    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
    Definition Classes
    IEventEmitter
  53. def stream(autoclose: Boolean): GridStoreStream

    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

    Returns read stream based on this GridStore file.

  55. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  56. def tell(): Promise[Int]

    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]

    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

    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]

    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

    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
    Definition Classes
    Object
  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. def unlink(callback: Function): Unit

    Deletes all the chunks of this file in the database.

  64. val usingDomains: Boolean
    Definition Classes
    IEventEmitter
  65. def valueOf(): Any
    Definition Classes
    Object
  66. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. def write(data: String, callback: Function): Unit

    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

    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

    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

    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

    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