File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ const DEFAULTS = {
17
17
*/
18
18
translateId : true ,
19
19
/**
20
- * Convert fields of record from databse that are ObjectIDs to strings
20
+ * Convert fields of record from database that are ObjectIDs to strings
21
+ *
22
+ * @name MongoDBAdapter#translateObjectIDs
21
23
* @type {Boolean }
22
24
* @default false
23
25
*/
@@ -78,6 +80,7 @@ const REMOVE_OPTS_DEFAULTS = {}
78
80
* @param {boolean } [opts.raw=false] See {@link Adapter#raw}.
79
81
* @param {object } [opts.removeOpts] See {@link MongoDBAdapter#removeOpts}.
80
82
* @param {boolean } [opts.translateId=true] See {@link MongoDBAdapter#translateId}.
83
+ * @param {boolean } [opts.translateObjectIDs=false] See {@link MongoDBAdapter#translateObjectIDs}.
81
84
* @param {object } [opts.updateOpts] See {@link MongoDBAdapter#updateOpts}.
82
85
* @param {string } [opts.uri="mongodb://localhost:27017"] See {@link MongoDBAdapter#uri}.
83
86
*/
@@ -172,7 +175,7 @@ export function MongoDBAdapter (opts) {
172
175
utils . fillIn ( this . updateOpts , UPDATE_OPTS_DEFAULTS )
173
176
174
177
/**
175
- * Default options to pass to collection#update .
178
+ * Default options to pass to collection#destroy .
176
179
*
177
180
* @name MongoDBAdapter#removeOpts
178
181
* @type {object }
Original file line number Diff line number Diff line change @@ -92,4 +92,13 @@ describe('MongoDBAdapter#find', function () {
92
92
assert . objectsEqual ( userList , [ { _id : id , name : 'John' } ] )
93
93
} )
94
94
} )
95
+
96
+ it ( 'should allow use of node-mongodb-native via adapter.client' , function ( ) {
97
+ return adapter . client . then ( ( db ) => {
98
+ assert . ok ( db . collection ( 'user' ) )
99
+ } )
100
+ . catch ( ( err ) => {
101
+ throw new Error ( err )
102
+ } )
103
+ } )
95
104
} )
You can’t perform that action at this time.
0 commit comments