How to use the @bentley/imodeljs-native.IModelJsNative.UpgradeOptions function in @bentley/imodeljs-native

To help you get started, we’ve selected a few @bentley/imodeljs-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / core / backend / src / IModelDb.ts View on Github external
public static performUpgrade(pathname: string): DbResult {
    const nativeDb = new IModelHost.platform.DgnDb();
    const res = nativeDb.openIModel(pathname, OpenMode.ReadWrite, IModelJsNative.UpgradeOptions.Upgrade);
    if (DbResult.BE_SQLITE_OK === res)
      nativeDb.closeIModel();
    return res;
  }