Skip to content

Update ECReferenceTypesCache to use schema context on IModelDb instead of SchemaLoader #273

@ColinKerr

Description

@ColinKerr

https://github.com/iTwin/imodel-transformer/blob/cc7c3fade07b7cf49c3920acc0af4170c17793e0/packages/transformer/src/ECReferenceTypesCache.ts#L121C1-L133C1

Changes:

  • Use schema context on IModelDb so schemas are only loaded once and reused for life time of IModelDb connection
  • Modify query so schema names are only returned once
  • order is no longer necessary for loading when using SchemaContext, is it necessary for init code? If not remove ordering, if so ordering is incorrect as ordering by ECInstanceId of ECSchemaDef does not provide correct order IF references change in schema updates

Consider:

  • How existing test coverage can be improved
  • Performance testing
  • Potential to replace schema traversal logic with one or more queries
  • Using updated ecschema-metadata APIs to get items of a type and to determine type without using instance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions