Member Junction
    Preparing search index...

    Default archive driver implementation. Archives configured field values to external storage, applies the appropriate post-archive action based on mode (StripFields, HardDelete, ArchiveOnly), and supports restoring the original values from the stored archive document. When StorageMode is 'Purge', it applies the mode without writing anything to storage.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get SupportsPurge(): boolean

      Whether this driver can run when StorageMode is 'Purge', where the context has no storage driver and no copy is kept. False by default. DefaultArchiveDriver returns true, and its subclasses inherit that unless they override it.

      Returns boolean

    Methods

    • Archives a single record.

      Store run (any StorageMode other than 'Purge'):

      1. Builds the archive document with field values
      2. Writes the document to external storage
      3. Applies the post-archive action based on mode:
        • StripFields: nullifies configured fields on the source record
        • HardDelete: writes one cascade batch file per dependent entity, deletes the dependent records leaf-first, then deletes the source record
        • ArchiveOnly: no changes to the source record

      Purge run: writes no archive document and no cascade batch file; applies only StripFields or HardDelete to the source record (and its dependents for HardDelete).

      Parameters

      Returns Promise<ArchiveRecordResult>

    • Builds a storage path for an archive document. Format: {basePath}/{SanitizedEntityName}/{RecordID}/{VersionStamp}.json

      Parameters

      • basePath: string

        The configured base path prefix

      • entityName: string

        The entity name (will be sanitized)

      • recordId: string

        The primary key value of the record

      • versionStamp: Date

        The timestamp for this archive version

      Returns string

      The full storage path string