object Mongoose extends Object with Connectable
Mongoose Singleton
- Annotations
- @native() @JSImport( "mongoose" , JSImport.Namespace )
- Alphabetic
- By Inheritance
- Mongoose
- Connectable
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
var
Promise: Any
The promises library in use by Mongoose
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
connect(uri: String, callback: Function2[MongooseError, Connection, Any]): Unit
Opens the default mongoose connection.
Opens the default mongoose connection.
- uri
the connection URI
- callback
the optional callback
- Definition Classes
- Connectable
-
def
connect(uri: String, collection: String, callback: Function2[MongooseError, Connection, Any]): Unit
Opens the default mongoose connection.
Opens the default mongoose connection.
- uri
the connection URI
- collection
the collection
- callback
the optional callback
- Definition Classes
- Connectable
-
def
connect(uri: String, options: |[ConnectionOptions, RawOptions], callback: Function2[MongooseError, Connection, Any]): Unit
Opens the default mongoose connection.
Opens the default mongoose connection.
- uri
the connection URI
- options
the optional options
- callback
the optional callback
- Definition Classes
- Connectable
-
def
connect(uri: String, collection: String): Connection
Opens the default mongoose connection.
Opens the default mongoose connection.
- uri
the connection URI
- collection
the collection
- returns
the mongoose connection
- Definition Classes
- Connectable
-
def
connect(uri: String, options: |[ConnectionOptions, RawOptions] = js.native): Connection
Opens the default mongoose connection.
Opens the default mongoose connection.
- uri
the connection URI
- options
the optional options
- returns
the mongoose connection
- Definition Classes
- Connectable
-
def
connection: Connection
This is the connection used by default for every model created using mongoose.model.
- def createConnection(url: String, options: |[ConnectionOptions, RawOptions] = js.native): Connection
-
def
disconnect(callback: Function1[Error, Any]): Unit
Disconnects all connections.
Disconnects all connections.
- callback
the call back
-
def
disconnect(): MongooseThenable[Unit]
Disconnects all connections.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T](key: String): UndefOr[T]
Gets mongoose options
Gets mongoose options
- key
the given key
- returns
the associated value
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def model[A](modelName: String, schema: Schema[A] = js.native, collectionName: String = js.native): MongooseModel[A]
-
def
modelNames(): Array[String]
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
-
def
mongo: MongoDB
The MongoDB instance
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def open(host: String, database: String, port: Int, options: RawOptions = js.native): Unit
-
def
plugin(callback: Function, options: RawOptions = js.native): Unit
Declares a global plugin executed on all Schemas.
Declares a global plugin executed on all Schemas.
- callback
the plugin callback
- options
the optional options
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
set(key: String, value: Any): Unit
Sets mongoose options
Sets mongoose options
- key
the options key
- value
the the value to set or function
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
object
Schema
extends Object
- Annotations
- @native()