How to use the PRIMARY function from mongodb

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

168
169
170
171
172
173
174
175
176
177
];

/**
 * The default read preference.
 */
var READ_PREFERENCE_DEFAULT = ReadPreference.PRIMARY;

Object.assign(props, {
  /**
   * @property {String} authentication - `auth_mechanism` for humans.
fork icon125
star icon776
watch icon35

3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
.all()
.forEach(call => {
  if (call.args[0].ns.collection.indexOf('GraphQLClass') >= 0) {
    foundGraphQLClassReadPreference = true;
    expect(call.args[0].options.readPreference.mode).toBe(
      ReadPreference.PRIMARY
    );
  } else if (call.args[0].ns.collection.indexOf('_User') >= 0) {
    foundUserClassReadPreference = true;
    expect(call.args[0].options.readPreference.mode).toBe(
fork icon0
star icon0
watch icon1

+ 7 other calls in file