@@ -138,16 +138,22 @@ Each database has an optional strict mode. If it is set then asking for a collec
138
138
that does not exist will return an Error object in the callback. Similarly if you
139
139
attempt to create a collection that already exists. Strict is provided for convenience.
140
140
141
- var error_client = new Db('integration_tests_', new Server("127.0.0.1", 27017, {auto_reconnect: false}), {strict:true});
141
+ var error_client = new Db(
142
+ 'integration_tests_',
143
+ new Server("127.0.0.1", 27017, {auto_reconnect: false}),
144
+ {strict:true});
142
145
test.assertEquals(true, error_client.strict);
143
146
error_client.open(function(err, error_client) {
144
147
error_client.collection('does-not-exist', function(err, collection) {
145
148
test.assertTrue(err instanceof Error);
146
- test.assertEquals("Collection does-not-exist does not exist. Currently in strict mode.", err.message);
149
+ test.assertEquals("Collection does-not-exist does not exist. " +
150
+ "Currently in strict mode.", err.message);
147
151
});
148
152
149
- error_client.createCollection('test_strict_access_collection', function(err, collection) {
150
- error_client.collection('test_strict_access_collection', function(err, collection) {
153
+ error_client.createCollection('test_strict_access_collection',
154
+ function(err, collection) {
155
+ error_client.collection('test_strict_access_collection',
156
+ function(err, collection) {
151
157
test.assertTrue(collection instanceof Collection);
152
158
// Let's close the db
153
159
error_client.close();
@@ -166,7 +172,7 @@ or the documentation at MongoDB for query and update formats.
166
172
Find
167
173
--------
168
174
169
- The find method is actually an (inconvenient) factory method to create
175
+ The find method is actually a factory method to create
170
176
Cursor objects. A Cursor lazily uses the connection the first time
171
177
you call ` nextObject ` , ` each ` , or ` toArray ` .
172
178
@@ -269,7 +275,7 @@ the modifier (`$inc`, etc.) formats.
269
275
270
276
Signature:
271
277
272
- collection.update(criteria, objNew, options, \ [callback\ ]);
278
+ collection.update(criteria, objNew, options, [callback]);
273
279
274
280
Useful options:
275
281
0 commit comments