Skip to content

Commit f912ccf

Browse files
rename and comments
1 parent b3051ad commit f912ccf

File tree

13 files changed

+15
-14
lines changed

13 files changed

+15
-14
lines changed

lib/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ Schema.prototype.add = function add(obj, prefix) {
893893
* @api private
894894
*/
895895
Schema.prototype._addEncryptedField = function _addEncryptedField(path, fieldConfig) {
896-
const type = this.path(path).autoEncryptionBSONType();
896+
const type = this.path(path).autoEncryptionType();
897897
if (type == null) {
898898
throw new Error(`Invalid BSON type for FLE field: '${path}'`);
899899
}

lib/schema/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ SchemaArray.prototype.toJSONSchema = function toJSONSchema(options) {
718718
};
719719
};
720720

721-
SchemaArray.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
721+
SchemaArray.prototype.autoEncryptionType = function autoEncryptionType() {
722722
return 'array';
723723
};
724724

lib/schema/bigint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ SchemaBigInt.prototype.toJSONSchema = function toJSONSchema(options) {
254254
return createJSONSchemaTypeDefinition('string', 'long', options?.useBsonType, isRequired);
255255
};
256256

257-
SchemaBigInt.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
257+
SchemaBigInt.prototype.autoEncryptionType = function autoEncryptionType() {
258258
return 'int64';
259259
};
260260

lib/schema/boolean.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ SchemaBoolean.prototype.toJSONSchema = function toJSONSchema(options) {
306306
return createJSONSchemaTypeDefinition('boolean', 'bool', options?.useBsonType, isRequired);
307307
};
308308

309-
SchemaBoolean.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
309+
SchemaBoolean.prototype.autoEncryptionType = function autoEncryptionType() {
310310
return 'boolean';
311311
};
312312

lib/schema/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ SchemaBuffer.prototype.toJSONSchema = function toJSONSchema(options) {
316316
return createJSONSchemaTypeDefinition('string', 'binData', options?.useBsonType, isRequired);
317317
};
318318

319-
SchemaBuffer.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
319+
SchemaBuffer.prototype.autoEncryptionType = function autoEncryptionType() {
320320
return 'binary';
321321
};
322322

lib/schema/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ SchemaDate.prototype.toJSONSchema = function toJSONSchema(options) {
442442
return createJSONSchemaTypeDefinition('string', 'date', options?.useBsonType, isRequired);
443443
};
444444

445-
SchemaDate.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
445+
SchemaDate.prototype.autoEncryptionType = function autoEncryptionType() {
446446
return 'date';
447447
};
448448

lib/schema/decimal128.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ SchemaDecimal128.prototype.toJSONSchema = function toJSONSchema(options) {
237237
return createJSONSchemaTypeDefinition('string', 'decimal', options?.useBsonType, isRequired);
238238
};
239239

240-
SchemaDecimal128.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
240+
SchemaDecimal128.prototype.autoEncryptionType = function autoEncryptionType() {
241241
return 'decimal128';
242242
};
243243

lib/schema/double.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ SchemaDouble.prototype.toJSONSchema = function toJSONSchema(options) {
220220
return createJSONSchemaTypeDefinition('number', 'double', options?.useBsonType, isRequired);
221221
};
222222

223-
SchemaDouble.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
223+
SchemaDouble.prototype.autoEncryptionType = function autoEncryptionType() {
224224
return 'double';
225225
};
226226

lib/schema/int32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ SchemaInt32.prototype.toJSONSchema = function toJSONSchema(options) {
262262
return createJSONSchemaTypeDefinition('number', 'int', options?.useBsonType, isRequired);
263263
};
264264

265-
SchemaInt32.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
265+
SchemaInt32.prototype.autoEncryptionType = function autoEncryptionType() {
266266
return 'int32';
267267
};
268268

lib/schema/objectId.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ SchemaObjectId.prototype.toJSONSchema = function toJSONSchema(options) {
306306
return createJSONSchemaTypeDefinition('string', 'objectId', options?.useBsonType, isRequired);
307307
};
308308

309-
SchemaObjectId.prototype.autoEncryptionBSONType = function autoEncryptionBSONType() {
309+
SchemaObjectId.prototype.autoEncryptionType = function autoEncryptionType() {
310310
return 'objectid';
311311
};
312312

0 commit comments

Comments
 (0)