onOpened StaticReadonly

onOpened: BeEvent<(_requestContext: ClientRequestContext, _imodelDb: BriefcaseDb) => void> = ...

Event raised just after a BriefcaseDb is opened. Example:

BriefcaseDb.onOpened.addListener((_requestContext: AuthorizedClientRequestContext | ClientRequestContext, iModel: BriefcaseDb) => {
  if (iModel.openMode !== OpenMode.ReadWrite)
    return;

  // Setting a concurrency control policy is an example of something you might do in an onOpened event handler.
  iModel.concurrencyControl.setPolicy(new ConcurrencyControl.OptimisticPolicy());
});

Defined in

Last Updated: 11 June, 2024