integrityCheck Method @beta
Performs integrity checks on this iModel. Types of integrity checks that can be performed are:
Default Check:
- Quick Check: Runs all integrity checks below and returns whether each check passed or failed, without detailed results.
Specific Checks:
- Data Columns Check: Checks if all the required columns exist in data tables. Issues are returned as a list of those tables/columns.
- EC Profile Check: Checks if the profile table, indexes, and triggers are present. Does not check be_* tables. Issues are returned as a list of tables/indexes/triggers which were not found or have different DDL.
- Navigation Class Ids Check: Checks if RelClassId of a Navigation property is a valid ECClassId. It does not check the value to match the relationship class.
- Navigation Ids Check: Checks if Id of a Navigation property matches a valid row primary class.
- Linktable Foreign Key Class Ids Check: Checks if SourceECClassId or TargetECClassId of a link table matches a valid ECClassId.
- Linktable Foreign Key Ids Check: Checks if SourceECInstanceId or TargetECInstanceId of a link table matches a valid row in primary class.
- Class Ids Check: Checks persisted ECClassId in all data tables and makes sure they are valid.
- Data Schema Check: Checks if all the required data tables and indexes exist for mapped classes. Issues are returned as a list of tables/columns which were not found or have different DDL.
- Schema Load Check: Checks if all schemas can be loaded into memory.
- Missing Child Rows Check: Checks if all child rows have a corresponding parent row.
integrityCheck(options?: IntegrityCheckOptions): Promise<IntegrityCheckResult[]>
@returns An array of integrity check results.
@throws IModelError if the iModel is not open.
| Parameter | Type | Description |
|---|---|---|
| options | IntegrityCheckOptions | Options specifying which integrity checks to perform. If no options are provided or all options are false, a quick check will be performed by default. |
Returns - Promise<IntegrityCheckResult[]>
An array of integrity check results.
Defined in
- core/backend/src/IModelDb.ts Line 672
Last Updated: 14 February, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.