Skip to content

Commit 1a48b98

Browse files
doc comments
1 parent edfbdfa commit 1a48b98

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/drivers/node-mongodb-native/connection.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ NativeConnection.prototype.createClient = async function createClient(uri, optio
359359
* a schemaMap and/or an encryptedFieldsMap for the connection, combining all models
360360
* into a single schemaMap and encryptedFields map.
361361
*
362-
* @returns a copy of the options object with a schemaMap and/or an encryptedFieldsMap added to the options' autoEncryption
363-
* options.
362+
* @returns the generated schemaMap and encryptedFieldsMap
364363
*/
365364
NativeConnection.prototype._buildEncryptionSchemas = function() {
366365
const qeMappings = {};

lib/schema.js

+6
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,9 @@ Schema.prototype._hasEncryptedFields = function _hasEncryptedFields() {
914914
return Object.keys(this.encryptedFields).length > 0;
915915
};
916916

917+
/**
918+
* Builds an encryptedFieldsMap for the schema.
919+
*/
917920
Schema.prototype._buildEncryptedFields = function() {
918921
const fields = Object.entries(this.encryptedFields).map(
919922
([path, config]) => {
@@ -925,6 +928,9 @@ Schema.prototype._buildEncryptedFields = function() {
925928
return { fields };
926929
};
927930

931+
/**
932+
* Builds a schemaMap for the schema, if the schema is configured for client-side field level encryption.
933+
*/
928934
Schema.prototype._buildSchemaMap = function() {
929935
/**
930936
* `schemaMap`s are JSON schemas, which use the following structure to represent objects:

0 commit comments

Comments
 (0)