onExportSchema Method

Override of IModelExportHandler.onExportSchema that serializes a schema to disk for IModelTransformer.processSchemas to import into the target iModel when it is exported from the source iModel.

onExportSchema(schema: Schema): Promise<void | ExportSchemaResult>

@returns Although the type is possibly void for backwards compatibility of subclasses, IModelTransformer.onExportSchema always returns anIModelExportHandler.ExportSchemaResult with a defined schemaPath property, for subclasses to know where the schema was written. Schemas are not guaranteed to be written to IModelTransformer._schemaExportDir by a known pattern derivable from the schema's name, so you must use this to find it.

Parameter Type Description
schema Schema  

Returns - Promise<void | ExportSchemaResult>

Although the type is possibly void for backwards compatibility of subclasses, IModelTransformer.onExportSchema always returns anIModelExportHandler.ExportSchemaResult with a defined schemaPath property, for subclasses to know where the schema was written. Schemas are not guaranteed to be written to IModelTransformer._schemaExportDir by a known pattern derivable from the schema's name, so you must use this to find it.

Defined in

Last Updated: 12 February, 2024