@@ -91,22 +91,22 @@ declare module "mongodb" {
91
91
92
92
interface SocketOptions {
93
93
//= set seconds before connection times out default:0
94
- timeout : number ;
94
+ timeout ? : number ;
95
95
//= Disables the Nagle algorithm default:true
96
- noDelay : bool ;
96
+ noDelay ? : bool ;
97
97
//= Set if keepAlive is used default:0 , which means no keepAlive, set higher than 0 for keepAlive
98
- keepAlive : number ;
98
+ keepAlive ? : number ;
99
99
//= ‘ascii’|’utf8’|’base64’ default:null
100
100
encoding ?: string ;
101
101
}
102
102
103
103
interface ServerOptions {
104
104
// - to reconnect automatically, default:false
105
- auto_reconnect : bool ;
105
+ auto_reconnect ? : bool ;
106
106
// - specify the number of connections in the pool default:1
107
- poolSize : number ;
107
+ poolSize ? : number ;
108
108
// - a collection of pr socket settings
109
- socketOptions : any ;
109
+ socketOptions ? : any ;
110
110
}
111
111
112
112
interface PKFactory {
@@ -116,46 +116,46 @@ declare module "mongodb" {
116
116
117
117
interface DBOptions {
118
118
//- if true, use native BSON parser
119
- native_parser : bool ;
119
+ native_parser ? : bool ;
120
120
//- sets strict mode , if true then existing collections can’t be “recreated” etc.
121
- strict : bool ;
121
+ strict ? : bool ;
122
122
//- custom primary key factory to generate _id values (see Custom primary keys).
123
- pk : PKFactory ;
123
+ pk ? : PKFactory ;
124
124
//- generation of objectid is delegated to the mongodb server instead of the driver. default is false
125
- forceServerObjectId : bool ;
125
+ forceServerObjectId ? : bool ;
126
126
//- specify the number of milliseconds between connection attempts default:5000
127
- retryMiliSeconds : number ;
127
+ retryMiliSeconds ? : number ;
128
128
//- specify the number of retries for connection attempts default:3
129
- numberOfRetries : number ;
129
+ numberOfRetries ? : number ;
130
130
//- enable/disable reaper (true/false) default:false
131
- reaper : bool ;
131
+ reaper ? : bool ;
132
132
//- specify the number of milliseconds between each reaper attempt default:10000
133
- reaperInterval : number ;
133
+ reaperInterval ? : number ;
134
134
//- specify the number of milliseconds for timing out callbacks that don’t return default:30000
135
- reaperTimeout : number ;
135
+ reaperTimeout ? : number ;
136
136
//- driver expects Buffer raw bson document, default:false
137
- raw : bool ;
137
+ raw ? : bool ;
138
138
}
139
139
140
140
interface CollectionCreateOptions {
141
141
// {true | {w:n, wtimeout:n} | {fsync:true}, default:false }, executes with a getLastError command returning the results of the command on MongoDB.
142
- safe : bool ;
142
+ safe ? : bool ;
143
143
// {Boolean, default:false}, serialize functions on the document.
144
- serializeFunctions : bool ;
144
+ serializeFunctions ? : bool ;
145
145
// {Boolean, default:false}, perform all operations using raw bson objects.
146
- raw : bool ;
146
+ raw ? : bool ;
147
147
// object overriding the basic ObjectID primary key generation.
148
- pkFactory : PKFactory ;
148
+ pkFactory ? : PKFactory ;
149
149
// {Boolean, default:false}, create a capped collection.
150
- capped : bool ;
150
+ capped ? : bool ;
151
151
// {Number}, the size of the capped collection in bytes.
152
- size : number ;
152
+ size ? : number ;
153
153
// {Number}, the maximum number of documents in the capped collection.
154
- max : number ;
154
+ max ? : number ;
155
155
// {Boolean, default:false}, create an index on the _id field of the document, not created automatically on capped collections.
156
- autoIndexId : bool ;
156
+ autoIndexId ? : bool ;
157
157
// {String}, the prefered read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST).
158
- readPreference : string ;
158
+ readPreference ? : string ;
159
159
}
160
160
161
161
export interface Collection {
@@ -233,29 +233,29 @@ declare module "mongodb" {
233
233
}
234
234
235
235
export interface CollectionFindOptions {
236
- limit ;
237
- sort ;
238
- fields ;
239
- skip ;
240
- hint ;
241
- explain ;
242
- snapshot ;
243
- timeout ;
244
- tailtable ;
245
- tailableRetryInterval ;
246
- numberOfRetries ;
247
- awaitdata ;
248
- exhaust ;
249
- batchSize ;
250
- returnKey ;
251
- maxScan ;
252
- min ;
253
- max ;
254
- showDiskLoc ;
255
- comment ;
256
- raw ;
257
- readPreferences ;
258
- partial ;
236
+ limit ? ;
237
+ sort ? ;
238
+ fields ? ;
239
+ skip ? ;
240
+ hint ? ;
241
+ explain ? ;
242
+ snapshot ? ;
243
+ timeout ? ;
244
+ tailtable ? ;
245
+ tailableRetryInterval ? ;
246
+ numberOfRetries ? ;
247
+ awaitdata ? ;
248
+ exhaust ? ;
249
+ batchSize ? ;
250
+ returnKey ? ;
251
+ maxScan ? ;
252
+ min ? ;
253
+ max ? ;
254
+ showDiskLoc ? ;
255
+ comment ? ;
256
+ raw ? ;
257
+ readPreferences ? ;
258
+ partial ? ;
259
259
}
260
260
261
261
export interface MongoCollectionOptions {
0 commit comments