Trait

io.scalajs.npm.mongoose

Connection

Related Doc: package mongoose

Permalink

trait Connection extends Object with IEventEmitter

Mongoose Connection

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

Abstract Value Members

  1. abstract def collection(name: String, options: RawOptions = js.native): Unit

    Permalink

    Retrieves a collection, creating it if not cached.

    Retrieves a collection, creating it if not cached.

    name

    of the collection

    options

    optional collection options

    returns

    the collection instance

Concrete 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): Connection.this.type

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

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def close(callback: Function1[MongooseError, Any]): Unit

    Permalink

    Closes the connection

  8. def close(): Promise[Any]

    Permalink

    Closes the connection

  9. def collections: Dictionary[Collection]

    Permalink

    A hash of the collections associated with this connection

  10. def config: Dictionary[Any]

    Permalink

    A hash of the global options that are associated with this connection

  11. def db: Db

    Permalink

    The mongodb.Db instance, set when the connection is opened

  12. var domain: String

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

    Permalink
    Definition Classes
    IEventEmitter
  14. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    IEventEmitter
  19. def hasOwnProperty(v: String): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

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

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

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

    Permalink
    Definition Classes
    IEventEmitter
  25. def model[A](name: String, schema: Schema[A] = js.native, collection: String = js.native, skipInit: Boolean = js.native): MongooseModel[A]

    Permalink

    Models defined on the mongoose instance are available to all connection created by the same mongoose instance.

    Models defined on the mongoose instance are available to all connection created by the same mongoose instance.

    name

    the model name or class extending Model

    schema

    the schema

    collection

    the name (optional, inferred from model name)

    skipInit

    indicates whether to skip initialization (defaults to false)

    returns

    the model

  26. def modelNames(): Array[String]

    Permalink

    Returns an array of model names created on this instance of Mongoose.

    Returns an array of model names created on this instance of Mongoose.

    returns

    an array of model names

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

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

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

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

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

    Permalink
    Definition Classes
    IEventEmitter
  32. def plugin(callback: Function, options: RawOptions = js.native): Unit

    Permalink

    Declares a global plugin executed on all Schemas.

    Declares a global plugin executed on all Schemas.

    callback

    the plugin callback

    options

    the optional options

  33. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  34. def readyState: Int

    Permalink

    Connection ready state

    Connection ready state

    • 0 = disconnected
    • 1 = connected
    • 2 = connecting
    • 3 = disconnecting

    Each state change emits its associated event name.

  35. def removeAllListeners(): Connection.this.type

    Permalink
    Definition Classes
    IEventEmitter
  36. def removeAllListeners(eventName: String): Connection.this.type

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

    Permalink
    Definition Classes
    IEventEmitter
  38. def set(key: String, value: Any): Unit

    Permalink

    Sets mongoose options

    Sets mongoose options

    key

    the options key

    value

    the the value to set or function

  39. def setMaxListeners(n: Int): Connection.this.type

    Permalink
    Definition Classes
    IEventEmitter
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toLocaleString(): String

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

    Permalink
    Definition Classes
    AnyRef → Any
  43. var usingDomains: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from IEventEmitter

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped