How to use the @bentley/imodeljs-backend.IModelDb.find function in @bentley/imodeljs-backend

To help you get started, we’ve selected a few @bentley/imodeljs-backend 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 / integration-tests / core / src / backend / RpcImpl.ts View on Github external
public async executeTest(tokenProps: IModelTokenProps, testName: string, params: any): Promise {
    const iModelToken = IModelToken.fromJSON(tokenProps);
    return JSON.parse(IModelDb.find(iModelToken).nativeDb.executeTest(testName, JSON.stringify(params)));
  }
github imodeljs / imodeljs / integration-tests / core / src / backend / RpcImpl.ts View on Github external
public async extractChangeSummaries(tokenProps: IModelTokenProps, options: any): Promise {
    const requestContext = ClientRequestContext.current as AuthorizedClientRequestContext;
    const iModelToken = IModelToken.fromJSON(tokenProps);
    await ChangeSummaryManager.extractChangeSummaries(requestContext, IModelDb.find(iModelToken), options as ChangeSummaryExtractOptions);
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async moveRobot(tokenProps: IModelTokenProps, id: Id64String, location: XYZProps): Promise {
    RobotWorldEngine.moveRobot(IModelDb.find(IModelToken.fromJSON(tokenProps)), id, Point3d.fromJSON(location));
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async insertBarrier(tokenProps: IModelTokenProps, modelId: Id64String, location: XYZProps, angle: AngleProps, length: number): Promise {
    return RobotWorldEngine.insertBarrier(IModelDb.find(IModelToken.fromJSON(tokenProps)), modelId, Point3d.fromJSON(location), Angle.fromJSON(angle), length);
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async countRobotsInArray(tokenProps: IModelTokenProps, elemIds: Id64String[]): Promise {
    const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
    return RobotWorldEngine.countRobotsInArray(iModelDb, elemIds);
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async countRobots(tokenProps: IModelTokenProps): Promise {
    const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
    return RobotWorldEngine.countRobots(iModelDb);
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async insertRobot(tokenProps: IModelTokenProps, modelId: Id64String, name: string, location: XYZProps): Promise {
    return RobotWorldEngine.insertRobot(IModelDb.find(IModelToken.fromJSON(tokenProps)), modelId, name, Point3d.fromJSON(location));
  }
github imodeljs / imodeljs / example-code / app / src / backend / RobotWorldRpcImpl.ts View on Github external
public async queryObstaclesHitByRobot(tokenProps: IModelTokenProps, rid: Id64String): Promise {
    const iModelDb: IModelDb = IModelDb.find(IModelToken.fromJSON(tokenProps));
    return RobotWorldEngine.queryObstaclesHitByRobot(iModelDb, rid);
  }
}