diff --git a/mongodb/mongodb.d.ts b/mongodb/mongodb.d.ts index d0257ad53..303ec5899 100644 --- a/mongodb/mongodb.d.ts +++ b/mongodb/mongodb.d.ts @@ -134,6 +134,7 @@ declare module "mongodb" { } // See : http://mongodb.github.io/node-mongodb-native/api-generated/db.html + // Current definition by documentation version 1.3.13 (28.08.2013) export interface DBOptions { // the write concern for the operation where < 1 is no acknowlegement of write and w >= 1, w = ‘majority’ or tag acknowledges the write. w?: string; @@ -147,6 +148,7 @@ declare module "mongodb" { // write waits for journal sync before returning. default:false. journal?: boolean; + // the prefered read preference. use 'ReadPreference' class. readPreference?: string; // use c++ bson parser. default:false. @@ -183,6 +185,14 @@ declare module "mongodb" { promoteLongs?: boolean; } + export class ReadPreference { + public static PRIMARY: string; + public static PRIMARY_PREFERRED: string; + public static SECONDARY: string; + public static SECONDARY_PREFERRED: string; + public static NEAREST: string; + } + export interface CollectionCreateOptions { // {true | {w:n, wtimeout:n} | {fsync:true}, default:false}, executes with a getLastError command returning the results of the command on MongoDB. safe?: boolean;