Member Junction
    Preparing search index...

    This class has methods that can check various aspects of a MemberJunction installation's integrity. Code Gen will run the various integrity checks based on configuration options that can be set in the master configuration file.

    Index

    Constructors

    Methods

    • Checks every in-scope entity on its own, so one failing entity does not hide the next one (#4737). For each entity the EntityField sequences must run 1..N with no duplicates, and the fields must line up with the base view's columns as the database catalog reports them. The catalog is read instead of a sample row so a view with no rows is still checked.

      Scope follows the run's schema configuration: excludeSchemas is skipped, and when includeSchemas is set only those schemas are checked.

      Parameters

      Returns Promise<IntegrityCheckResult>

    • Checks one entity's fields (already ordered by Sequence).

      Parameters

      • fields: EntityFieldSequenceRow[]
      • catalog: Map<string, string[]>
      • excludedViewFields: { bare: Set<string>; qualified: Set<string> }

      Returns string

      an empty string when the entity passes, otherwise the failure text

    • Base-view column exclusions (baseViewExcludedFields) keep an EntityField whose column the view leaves out on purpose, so those fields are skipped in the column comparison. Entries are Entity.Field or a bare Field (any entity). Empty unless exclusions are permitted.

      Returns { bare: Set<string>; qualified: Set<string> }

    • True when the schema is checked: not in excludeSchemas, and in includeSchemas when that list is set. Compared case-insensitively.

      Parameters

      • schemaName: string | null | undefined

      Returns boolean

    • Reads the column order of every view and table in the given schemas from INFORMATION_SCHEMA.COLUMNS, which both SQL Server and PostgreSQL provide.

      Parameters

      Returns Promise<Map<string, string[]>>

      schema.object (lower case) → column names in ordinal order