Skip to content

Commit

Permalink
feat: support autoEncryption option for MongoDB (#6865)
Browse files Browse the repository at this point in the history
  • Loading branch information
NthMetal committed Oct 8, 2020
1 parent 2bf15ca commit b22c27f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/driver/mongodb/MongoConnectionOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,9 @@ export interface MongoConnectionOptions extends BaseConnectionOptions {
* https://github.com/mongodb/node-mongodb-native/releases/tag/v3.2.1
*/
readonly useUnifiedTopology?: boolean;

/**
* Automatic Client-Side Field Level Encryption configuration.
*/
readonly autoEncryption?: any;
}
5 changes: 3 additions & 2 deletions src/driver/mongodb/MongoDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class MongoDriver implements Driver {
/**
* Valid mongo connection options
* NOTE: Keep sync with MongoConnectionOptions
* Sync with http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html
* Sync with http://mongodb.github.io/node-mongodb-native/3.5/api/MongoClient.html
*/
protected validOptionNames: string[] = [
"poolSize",
Expand Down Expand Up @@ -196,7 +196,8 @@ export class MongoDriver implements Driver {
"minSize",
"monitorCommands",
"useNewUrlParser",
"useUnifiedTopology"
"useUnifiedTopology",
"autoEncryption"
];

// -------------------------------------------------------------------------
Expand Down

0 comments on commit b22c27f

Please sign in to comment.