Skip to content

Native Bulk Element Deletion API#1344

Merged
RohitPtnkr1996 merged 36 commits into
mainfrom
rohitptnkr/bulk-element-deletion
Apr 6, 2026
Merged

Native Bulk Element Deletion API#1344
RohitPtnkr1996 merged 36 commits into
mainfrom
rohitptnkr/bulk-element-deletion

Conversation

@RohitPtnkr1996

@RohitPtnkr1996 RohitPtnkr1996 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@RohitPtnkr1996 RohitPtnkr1996 marked this pull request as ready for review March 3, 2026 14:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a native bulk element deletion capability to the iModel native layer and exposes it through the Node addon/TypeScript API, including a specialized path for deleting DefinitionElements with dependency checks.

Changes:

  • Added deleteElements and deleteDefinitionElements to the TypeScript native interface and N-API bindings.
  • Implemented bulk deletion in DgnElements, including descendant expansion, code-scope FK safety checks, and bulk link-table cleanup.
  • Extended DefinitionElementUsageInfo to support excluding a set of element ids during usage scans.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
iModelJsNodeAddon/api_package/ts/src/NativeLibrary.ts Declares new native bulk deletion APIs in the TS surface.
iModelJsNodeAddon/JsInteropDgnDb.cpp Parses JS arrays of ids and calls new native bulk deletion entry points.
iModelJsNodeAddon/IModelJsNative.h Adds JsInterop declarations for bulk deletion.
iModelJsNodeAddon/IModelJsNative.cpp Adds N-API instance methods and marshals failure-id results back to JS.
iModelCore/iModelPlatform/PublicAPI/DgnPlatform/DgnElement.h Adds bulk-operation state on DgnElements and extends usage-info API/signature.
iModelCore/iModelPlatform/DgnCore/DgnElements.cpp Implements bulk element deletion and definition-element deletion logic.
iModelCore/iModelPlatform/DgnCore/DgnElement.cpp Skips per-element link-table cleanup during bulk delete (handled in bulk).
iModelCore/iModelPlatform/DgnCore/DefinitionElementUsageInfo.cpp Adds optional “exclude ids” filtering to usage queries/scans.

Comment thread iModelCore/iModelPlatform/DgnCore/DgnElements.cpp Outdated
Comment thread iModelCore/iModelPlatform/DgnCore/DgnElements.cpp Outdated
Comment thread iModelCore/iModelPlatform/PublicAPI/DgnPlatform/DgnElement.h Outdated
Comment thread iModelCore/iModelPlatform/DgnCore/DgnElements.cpp
Comment thread iModelJsNodeAddon/IModelJsNative.cpp
Comment thread iModelJsNodeAddon/JsInteropDgnDb.cpp Outdated
Comment thread iModelJsNodeAddon/JsInteropDgnDb.cpp Outdated
Comment thread iModelCore/iModelPlatform/DgnCore/DgnElements.cpp Outdated
Comment thread iModelCore/iModelPlatform/DgnCore/DgnElements.cpp
@RohitPtnkr1996 RohitPtnkr1996 requested a review from rschili March 10, 2026 07:45
@RohitPtnkr1996 RohitPtnkr1996 enabled auto-merge (squash) April 6, 2026 08:31
@RohitPtnkr1996 RohitPtnkr1996 merged commit 2b9d06a into main Apr 6, 2026
20 checks passed
@RohitPtnkr1996 RohitPtnkr1996 deleted the rohitptnkr/bulk-element-deletion branch April 6, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants