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 = {
1717 */
1818 translateId : true ,
1919 /**
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
2123 * @type {Boolean }
2224 * @default false
2325 */
@@ -78,6 +80,7 @@ const REMOVE_OPTS_DEFAULTS = {}
7880 * @param {boolean } [opts.raw=false] See {@link Adapter#raw}.
7981 * @param {object } [opts.removeOpts] See {@link MongoDBAdapter#removeOpts}.
8082 * @param {boolean } [opts.translateId=true] See {@link MongoDBAdapter#translateId}.
83+ * @param {boolean } [opts.translateObjectIDs=false] See {@link MongoDBAdapter#translateObjectIDs}.
8184 * @param {object } [opts.updateOpts] See {@link MongoDBAdapter#updateOpts}.
8285 * @param {string } [opts.uri="mongodb://localhost:27017"] See {@link MongoDBAdapter#uri}.
8386 */
@@ -172,7 +175,7 @@ export function MongoDBAdapter (opts) {
172175 utils . fillIn ( this . updateOpts , UPDATE_OPTS_DEFAULTS )
173176
174177 /**
175- * Default options to pass to collection#update .
178+ * Default options to pass to collection#destroy .
176179 *
177180 * @name MongoDBAdapter#removeOpts
178181 * @type {object }
Original file line number Diff line number Diff line change @@ -92,4 +92,13 @@ describe('MongoDBAdapter#find', function () {
9292 assert . objectsEqual ( userList , [ { _id : id , name : 'John' } ] )
9393 } )
9494 } )
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+ } )
95104} )
You can’t perform that action at this time.
0 commit comments