importSchemas Method
Import an ECSchema. On success, the schema definition is stored in the iModel. This method is asynchronous (must be awaited) because, in the case where this IModelDb is a briefcase, this method first obtains the schema lock from the iModel server. You must import a schema into an iModel before you can insert instances of the classes in that schema. See Element
importSchemas(schemaFileNames: string[], options?: SchemaImportOptions): Promise<void>
@throws IModelError if the schema lock cannot be obtained or there is a problem importing the schema.
@note Changes are saved if importSchemas is successful and abandoned if not successful.
- You can use NativeLoggerCategory to turn on the native logs. You can also control what exactly is logged by the loggers.
- See Schema Versioning for more information on acceptable changes to schemas.
@see querySchemaVersion
Parameter | Type | Description |
---|---|---|
schemaFileNames | string[] | |
options | SchemaImportOptions | options during schema import. |
Returns - Promise
Defined in
- core/backend/src/IModelDb.ts Line 819
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.