Class: CollectionEncrypt

CollectionEncrypt(setup)

Represents a collection field that references encrypted data stored in the 'safe_values' collection. Extends CollectionField class and sets up the type as ObjectId, referencing 'safe_values' collection.

Constructor

new CollectionEncrypt(setup)

Creates a new CollectionEncrypt instance with the provided setup parameters.

Parameters:
Name Type Description
setup Object

The setup object containing configuration details for the collection field.

Source:
Throws:

If there is an error during instantiation, it is caught and logged.

Type
Error.Log

Extends

Members

isEncrypt :boolean

Indicates if the field is encrypted when saved to database.

Type:
  • boolean
Overrides:
Source:

Methods

toObject() → {Object}

Converts the CollectionField object to a plain JavaScript object.

Overrides:
Source:
Returns:
  • The plain JavaScript object representing the CollectionField.
Type
Object