ChangesetReader Class @beta
Reads EC-typed changeset data natively from a changeset file, changeset group, in-memory transaction, or local un-pushed changes.
Implements ChangeSource so rows can be fed directly into PartialChangeUnifier to merge partial (per-table) instances into complete EC instances.
When the current row is a non-EC internal SQLite table, isECTable is false
and both inserted and deleted remain undefined.
@note The native reader operates one SQLite table-row at a time. Multi-table EC instances must be merged using PartialChangeUnifier.
Implements
- Disposable
- ChangeSource
Methods
| Name | Description | |
|---|---|---|
| [dispose](): void | Implements the Disposable contract — calls close. |
|
| clearClassNameFilters(): void | Remove the class-name filters | |
| clearOpCodeFilters(): void | Remove the op-code filters | |
| clearTableNameFilters(): void | Remove the table-name filters | |
| close(): void | Close the reader and release all native resources. | |
| setClassNameFilters(classNames: Set<string>): void | Restrict iteration to changes for the given EC class names. | |
| setOpCodeFilters(ops: Set<SqliteChangeOp>): void | Restrict iteration to changes with the given operation types. | |
| setTableNameFilters(tableNames: Set<string>): void | Restrict iteration to changes from the named SQLite tables. | |
| step(): boolean | Advance to the next change and populate inserted and/or deleted. |
|
| openFile(args: { fileName: string } & ChangesetReaderArgs): ChangesetReader Static | Open a changeset file from disk. | |
| openGroup(args: { changesetFiles: string[] } & ChangesetReaderArgs): ChangesetReader Static | Concatenate multiple changeset files and read them as a single logical stream. | |
| openInMemoryChanges(args: Omit<ChangesetReaderArgs, "db"> & { db: IModelDb }): ChangesetReader Static | Read the in-memory (not yet saved to disk) changes of an open IModelDb. | |
| openLocalChanges(args: Omit<ChangesetReaderArgs, "db"> & { db: IModelDb, includeInMemoryChanges?: boolean }): ChangesetReader Static | Read pending (not yet pushed) local changes from an open IModelDb. | |
| openTxn(args: Omit<ChangesetReaderArgs, "db"> & { db: IModelDb, txnId: string }): ChangesetReader Static | Read a single saved transaction by its id. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| db Readonly | AnyDb | The db used for EC schema resolution. | |
| deleted | ChangeInstance | undefined | Pre-change (deleted or updated-old) EC instance, populated after each step call. | |
| inserted | ChangeInstance | undefined | Post-change (inserted or updated-new) EC instance, populated after each step call. | |
| isECTable Accessor ReadOnly | boolean | true when the current row belongs to an EC-mapped table. |
|
| isIndirectChange Accessor ReadOnly | boolean | true when the current change was applied indirectly |
|
| op Accessor ReadOnly | SqliteChangeOp | SQLite opcode of the current change. | |
| tableName Accessor ReadOnly | string | Name of the SQLite table for the current change row. |
Defined in
- backend/src/ChangesetReader.ts Line 37
Last Updated: 05 May, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.