How to use the ReadPreference function from mongodb

Find comprehensive JavaScript mongodb.ReadPreference code examples handpicked from public code repositorys.

17
18
19
20
21
22
23
24
25
26
/*!
 * Module dependencies.
 */

var mongodb = require('mongodb');
var ReadPref = mongodb.ReadPreference;

/*!
 * Converts arguments to ReadPrefs the driver
 * can understand.
fork icon194
star icon596
watch icon44

+ 3 other calls in file

27
28
29
30
31
32
33
34
35
36
37
38
39
import logger from '../../../logger';


// @flow-disable-next
const mongodb = require('mongodb');
const MongoClient = mongodb.MongoClient;
const ReadPreference = mongodb.ReadPreference;


const MongoSchemaCollectionName = '_SCHEMA';


const storageAdapterAllCollections = mongoAdapter => {
fork icon0
star icon0
watch icon1