Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
mongoose
Connection
Interface Connection
Hierarchy
EventEmitter
Connection
Index
Properties
collections
db
readyState
Methods
addListener
close
collection
constructor
emit
listeners
model
modelNames
on
once
open
openSet
removeAllListeners
removeListener
setMaxListeners
Properties
public
collections
:
{ [index: string]: "mongoose".Collection; }
(
)
:
Collection
Returns
Collection
public
db
:
any
public
readyState
:
number
Methods
public
addListener
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
close
(
callback
?:
(err: any) => void
)
:
Connection
Parameters
callback?:
(err: any) => void
optional
Returns
Connection
public
collection
(
name
:
string
, options
?:
Object
)
:
Collection
Parameters
name:
string
options?:
Object
optional
Returns
Collection
public
constructor
(
base
:
Mongoose
)
:
Connection
Parameters
base:
Mongoose
Returns
Connection
public
emit
(
event
:
string
, args
?:
Array<any>
)
:
boolean
Parameters
event:
string
args?:
Array<any>
optional
Returns
boolean
public
listeners
(
event
:
string
)
:
Array<Function>
Parameters
event:
string
Returns
Array<Function>
public
model
(
name
:
string
, schema
:
Schema
, collection
?:
string
)
:
Model
Parameters
name:
string
schema:
Schema
collection?:
string
optional
Returns
Model
public
modelNames
(
)
:
Array<string>
Returns
Array<string>
public
on
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
once
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
open
(
host
:
string
, database
?:
string
, port
?:
number
, options
?:
ConnectionOption
, callback
?:
(err: any) => void
)
:
Connection
Parameters
host:
string
database?:
string
optional
port?:
number
optional
options?:
ConnectionOption
optional
callback?:
(err: any) => void
optional
Returns
Connection
public
openSet
(
uris
:
string
, database
?:
string
, options
?:
ConnectionSetOption
, callback
?:
(err: any) => void
)
:
Connection
Parameters
uris:
string
database?:
string
optional
options?:
ConnectionSetOption
optional
callback?:
(err: any) => void
optional
Returns
Connection
public
removeAllListeners
(
event
?:
string
)
:
EventEmitter
Parameters
event?:
string
optional
Returns
EventEmitter
public
removeListener
(
event
:
string
, listener
:
Function
)
:
EventEmitter
Parameters
event:
string
listener:
Function
Returns
EventEmitter
public
setMaxListeners
(
n
:
number
)
Parameters
n:
number
Globals
NodeJS
assert
buffer
child_process
cluster
crypto
dgram
dns
domain
events
fs
http
https
mongoose
mongoose.Types
net
os
path
punycode
querystring
readline
repl
stream
string_decoder
tls
tty
url
util
vm
zlib
connection
mongo
mquery
version
Collection
Connection
collections
db
readyState
addListener
close
collection
constructor
emit
listeners
model
modelNames
on
once
open
openSet
removeAllListeners
removeListener
setMaxListeners
ConnectionOption
ConnectionSetOption
Document
FindAndUpdateOption
GeoSearchOption
MapReduceOption
MapReduceOption2
MapReduceResult
Model
PopulateOption
QueryStream
SchemaOption
Aggregate
Mongoose
Promise
Query
Schema
SchemaType
VirtualType
connect
createConnection
disconnect
get
model
modelNames
plugin
set