How to use the @bentley/imodeljs-backend.DefinitionPartition.createCode 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 / presentation / backend / src / RulesetEmbedder.ts View on Github external
private insertDefinitionPartition(rulesetSubject: Subject): DefinitionPartition {
    const partitionCode = DefinitionPartition.createCode(this._iModelDb, rulesetSubject.id, this._rulesetModelName);
    const definitionPartitionProps: InformationPartitionElementProps = {
      parent: {
        id: rulesetSubject.id,
        relClassName: "BisCore:SubjectOwnsPartitionElements",
      },
      model: rulesetSubject.model,
      code: partitionCode,
      classFullName: DefinitionPartition.classFullName,
    };
    const id = this._iModelDb.elements.insertElement(definitionPartitionProps);
    return this._iModelDb.elements.getElement(id) as DefinitionPartition;
  }
github imodeljs / imodeljs / presentation / backend / src / RulesetEmbedder.ts View on Github external
private queryDefinitionPartition(): DefinitionPartition | undefined {
    const subject = this.querySubject();
    if (undefined === subject)
      return undefined;

    return this._iModelDb.elements.getElement(DefinitionPartition.createCode(this._iModelDb, subject.id, this._rulesetModelName));
  }