Skip to content
Merged
Show file tree
Hide file tree
Changes from 91 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
bae4da3
Initial wrapper implemented
soham-bentley Mar 27, 2026
a708c19
Update
soham-bentley Mar 27, 2026
187f561
Added test
soham-bentley Mar 27, 2026
b8dffb6
Update
soham-bentley Mar 27, 2026
847e536
More updates
soham-bentley Mar 27, 2026
553c98d
Revert "Initial wrapper implemented"
soham-bentley Mar 28, 2026
1412bcd
New api added
soham-bentley Mar 28, 2026
8f2d16a
Update
soham-bentley Mar 29, 2026
06058ad
First working test
soham-bentley Apr 1, 2026
8dbaa56
Update
soham-bentley Apr 2, 2026
ea431c8
Tests updated and implementation consolidated
soham-bentley Apr 3, 2026
d5a84ea
More tests added
soham-bentley Apr 3, 2026
00bbfcc
Added more tests
soham-bentley Apr 3, 2026
a744b01
Final tests pushed
soham-bentley Apr 3, 2026
1d3f5f8
Updated heading test
soham-bentley Apr 3, 2026
748a128
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 3, 2026
e25d005
Mlore update
soham-bentley Apr 3, 2026
906ff1f
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 3, 2026
08f30bc
Fixed some comments
soham-bentley Apr 6, 2026
6b6a12d
Removed unnecessary stuff
soham-bentley Apr 6, 2026
c9308da
Splitting files
soham-bentley Apr 6, 2026
90fc9bd
Some lint issues solved
soham-bentley Apr 6, 2026
d2e0549
Final update
soham-bentley Apr 6, 2026
aabbb75
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 6, 2026
df75b29
Added IsIndirectChanges
soham-bentley Apr 7, 2026
fa49c4a
Updated documentation
soham-bentley Apr 7, 2026
8651fc2
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 7, 2026
3449f06
Fixed lint errors
soham-bentley Apr 7, 2026
8da2a05
extract-api issues solved and changes pushed
soham-bentley Apr 8, 2026
6a58a7b
More lint issues solved
soham-bentley Apr 8, 2026
8bf2387
Fixed some more issues
soham-bentley Apr 8, 2026
0656b75
Added filtering
soham-bentley Apr 8, 2026
8e905fd
Updated doc
soham-bentley Apr 8, 2026
17a879c
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 8, 2026
a9fc69b
Added lint deprecated suppression logic for lint
soham-bentley Apr 8, 2026
af8b278
Fixed some more issues
soham-bentley Apr 8, 2026
d4dd31f
Added another test
soham-bentley Apr 9, 2026
25f6070
Added another test
soham-bentley Apr 9, 2026
0d5613c
Added perf tests
soham-bentley Apr 9, 2026
b2cbbbb
Final update
soham-bentley Apr 9, 2026
f70d52f
Modified the tests
soham-bentley Apr 9, 2026
741be82
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 9, 2026
6226381
removed commented code
soham-bentley Apr 9, 2026
477addd
Added a test for overflow table
soham-bentley Apr 9, 2026
8aba117
extract-api updated
soham-bentley Apr 9, 2026
e85e554
Updated doc and fixed lint error
soham-bentley Apr 9, 2026
b2c03f9
variable names changed from changesetFetchedProps ->changeFetchedProp…
soham-bentley Apr 10, 2026
ff920c7
Docuemntation updated
soham-bentley Apr 10, 2026
64f19eb
remove additional character in comment
rschili Apr 11, 2026
6f6051e
Added more test
soham-bentley Apr 13, 2026
c8c7223
Merge branch 'soham/native-ec-reader' of https://github.com/iTwin/itw…
soham-bentley Apr 13, 2026
0766efa
Comment updated
soham-bentley Apr 13, 2026
bd5c22b
Updated docs and comments
soham-bentley Apr 14, 2026
5efd46d
Fixed some comments
soham-bentley Apr 14, 2026
846c4bf
Fixed comments
soham-bentley Apr 14, 2026
655becc
Lint issues solved
soham-bentley Apr 14, 2026
9701fa0
More update
soham-bentley Apr 14, 2026
3f5d88f
Update
soham-bentley Apr 14, 2026
a6c6c72
Fixed extract-api and build issues
soham-bentley Apr 14, 2026
71e51dc
Update
soham-bentley Apr 14, 2026
671b769
Minor adjustments
soham-bentley Apr 15, 2026
3b60d2e
Update in docs
soham-bentley Apr 15, 2026
d6242a3
Update
soham-bentley Apr 15, 2026
dc2cd05
extract-api changes
soham-bentley Apr 15, 2026
ed5e428
doc updated
soham-bentley Apr 15, 2026
304553f
Comments updated
soham-bentley Apr 15, 2026
774a68f
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 15, 2026
ca02599
comment update
soham-bentley Apr 15, 2026
8a47228
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 17, 2026
d082b8c
Changed example code to fix rush cover failures
soham-bentley Apr 17, 2026
3a7aa5b
docs(backend): link ECChangesetReader references for docs site crossrefs
Copilot Apr 17, 2026
c1924f7
All comments fixed
soham-bentley Apr 20, 2026
badd733
Merge branch 'soham/native-ec-reader' of https://github.com/iTwin/itw…
soham-bentley Apr 20, 2026
bd8e649
Docs and lint issues fixed
soham-bentley Apr 20, 2026
ebb2e70
extract-api changes
soham-bentley Apr 20, 2026
473fef9
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 20, 2026
e869383
copilot comment fixed
soham-bentley Apr 20, 2026
c1508db
Comments updated
soham-bentley Apr 20, 2026
9bb5807
Updated comments
soham-bentley Apr 20, 2026
8917d90
propFilter changed from string to PropertyFilter
soham-bentley Apr 21, 2026
a45536f
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 21, 2026
513b436
Updated a test
soham-bentley Apr 23, 2026
5ec3bea
Test updates
soham-bentley Apr 23, 2026
9563a27
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 23, 2026
0c76f31
Update in few tests and docs
soham-bentley Apr 23, 2026
d887dee
Update
soham-bentley Apr 23, 2026
9c031e0
Added one more test
soham-bentley Apr 23, 2026
293dfa2
Updated file names
soham-bentley Apr 23, 2026
617e9ed
Removed change file
soham-bentley Apr 23, 2026
119a460
Added new change log
soham-bentley Apr 23, 2026
4fcc09a
extract-api changes
soham-bentley Apr 23, 2026
52bcf50
Docs updated
soham-bentley Apr 23, 2026
1f1f09a
Update in native api names
soham-bentley Apr 24, 2026
ffe8b7b
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 24, 2026
fc3ead3
Merge branch 'master' into soham/native-ec-reader
khanaffan Apr 24, 2026
467c1e2
Update in docs
soham-bentley Apr 27, 2026
038d3ab
Merge branch 'soham/native-ec-reader' of https://github.com/iTwin/itw…
soham-bentley Apr 27, 2026
e8e5b6d
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 27, 2026
0154f64
@bentley/imodeljs-native 5.9.14
imodeljs-admin Apr 27, 2026
098f8cf
Merge branch 'master' of https://github.com/iTwin/itwinjs-core into s…
soham-bentley Apr 27, 2026
6c35882
Merge branch 'soham/native-ec-reader' of https://github.com/iTwin/itw…
soham-bentley Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@
]
},
{
"name": "[perftests] Changeset PerfTests (Offline)",
"name": "[perftests] Sqlite Changeset Reader and ChangesetECAdaptor PerfTests (Offline)",
"presentation": {
"group": "Perftests"
},
Expand All @@ -637,7 +637,24 @@
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"perftest:changesetPerformance"
"perftest:sqliteChangesetReaderAndChangesetECAdaptorPerformance"
],
"outFiles": [
"${workspaceFolder}/full-stack-tests/*/lib/**/*.js"
]
},
{
"name": "[perftests] ChangesetReader PerfTests (Offline)",
"presentation": {
"group": "Perftests"
},
"cwd": "${workspaceFolder}/full-stack-tests/backend",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"perftest:changesetReaderPerformance"
],
"outFiles": [
"${workspaceFolder}/full-stack-tests/*/lib/**/*.js"
Expand Down
114 changes: 111 additions & 3 deletions common/api/core-backend.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,14 @@ export class CategorySelector extends DefinitionElement {
}

// @beta
export interface ChangeCache extends Disposable {
all(): IterableIterator<ChangeInstance>;
count(): number;
get(key: string): ChangeInstance | undefined;
set(key: string, value: ChangeInstance): void;
}

// @beta @deprecated
export interface ChangedECInstance {
// (undocumented)
$meta?: ChangeMetaData;
Expand Down Expand Up @@ -899,6 +907,12 @@ export interface ChangeFormatArgs {
includeTableName?: true;
}

// @beta
export interface ChangeInstance {
$meta: ChangeMeta;
[key: string]: any;
}

// @beta
export interface ChangeInstanceKey {
changeType: "inserted" | "updated" | "deleted";
Expand All @@ -907,6 +921,19 @@ export interface ChangeInstanceKey {
}

// @beta
export interface ChangeMeta {
changeFetchedPropNames: string[];
changeIndexes: number[];
instanceKey: string;
isIndirectChange: boolean;
op: SqliteChangeOp;
propFilter: PropertyFilter;
rowOptions?: RowFormatOptions;
stage: SqliteValueStage;
tables: string[];
}

// @beta @deprecated
export interface ChangeMetaData {
changeIndexes: number[];
classFullName?: string;
Expand All @@ -922,7 +949,7 @@ export interface ChangesetArg extends IModelIdArg {
readonly changeset: ChangesetIndexOrId;
}

// @beta
// @beta @deprecated
export class ChangesetECAdaptor implements Disposable {
[Symbol.dispose](): void;
constructor(reader: SqliteChangesetReader, disableMetaData?: boolean);
Expand Down Expand Up @@ -960,6 +987,58 @@ export interface ChangesetRangeArg extends IModelIdArg {
readonly range?: ChangesetRange;
}

// @beta
export class ChangesetReader implements Disposable, ChangeSource {
[Symbol.dispose](): void;
clearClassNameFilters(): void;
clearOpCodeFilters(): void;
clearTableNameFilters(): void;
close(): void;
readonly db: AnyDb;
deleted?: ChangeInstance;
inserted?: ChangeInstance;
get isECTable(): boolean;
get isIndirectChange(): boolean;
get op(): SqliteChangeOp;
static openFile(args: {
readonly fileName: string;
} & ChangesetReaderArgs): ChangesetReader;
static openGroup(args: {
readonly changesetFiles: string[];
} & ChangesetReaderArgs): ChangesetReader;
static openInMemoryChanges(args: Omit<ChangesetReaderArgs, "db"> & {
db: IModelDb;
}): ChangesetReader;
static openLocalChanges(args: Omit<ChangesetReaderArgs, "db"> & {
db: IModelDb;
includeInMemoryChanges?: boolean;
}): ChangesetReader;
static openTxn(args: Omit<ChangesetReaderArgs, "db"> & {
db: IModelDb;
txnId: Id64String;
}): ChangesetReader;
setClassNameFilters(classNames: Set<string>): void;
setOpCodeFilters(ops: Set<SqliteChangeOp>): void;
setTableNameFilters(tableNames: Set<string>): void;
step(): boolean;
get tableName(): string;
}

// @beta
export interface ChangesetReaderArgs {
readonly db: AnyDb;
readonly invert?: boolean;
readonly propFilter?: PropertyFilter;
readonly rowOptions?: RowFormatOptions;
}

// @beta
export interface ChangeSource {
readonly deleted?: ChangeInstance;
readonly inserted?: ChangeInstance;
readonly op: SqliteChangeOp;
}

// @beta
export interface ChangeSummary {
// (undocumented)
Expand Down Expand Up @@ -994,6 +1073,12 @@ export class ChangeSummaryManager {
static queryInstanceChange(iModel: BriefcaseDb, instanceChangeId: Id64String): InstanceChange;
}

// @beta (undocumented)
export namespace ChangeUnifierCache {
export function createInMemoryCache(): ChangeCache;
export function createSqliteBackedCache(bufferedReadInstanceSizeInBytes?: number): ChangeCache;
}

// @beta
export interface ChannelControl {
// @internal (undocumented)
Expand Down Expand Up @@ -2248,15 +2333,15 @@ export abstract class DriverBundleElement extends InformationContentElement {
static get className(): string;
}

// @beta
// @beta @deprecated
export interface ECChangeUnifierCache extends Disposable {
all(): IterableIterator<ChangedECInstance>;
count(): number;
get(key: string): ChangedECInstance | undefined;
set(key: string, value: ChangedECInstance): void;
}

// @beta (undocumented)
// @beta @deprecated (undocumented)
export namespace ECChangeUnifierCache {
export function createInMemoryCache(): ECChangeUnifierCache;
export function createSqliteBackedCache(db: AnyDb, bufferedReadInstanceSizeInBytes?: number): ECChangeUnifierCache;
Expand Down Expand Up @@ -5423,6 +5508,15 @@ export class OrthographicViewDefinition extends SpatialViewDefinition {
export function parseTextAnnotationData(json: string | undefined): VersionedJSON<TextAnnotationProps> | undefined;

// @beta
export class PartialChangeUnifier implements Disposable {
[Symbol.dispose](): void;
constructor(_cache?: ChangeCache);
appendFrom(source: ChangeSource): void;
get instanceCount(): number;
get instances(): IterableIterator<ChangeInstance>;
}

// @beta @deprecated
export class PartialECChangeUnifier implements Disposable {
[Symbol.dispose](): void;
constructor(_db: AnyDb, _cache?: ECChangeUnifierCache);
Expand Down Expand Up @@ -5609,6 +5703,13 @@ export interface ProjectInformationRecordCreateArgs extends ProjectInformation {
parentSubjectId: Id64String;
}

// @beta
export enum PropertyFilter {
All = 0,
BisCoreElement = 1,
InstanceKey = 2
}

// @public @preview
export type PropertyHandler = (name: string, property: Property) => void;

Expand Down Expand Up @@ -5970,6 +6071,13 @@ export class RoleModel extends Model {
static get className(): string;
}

// @beta
export interface RowFormatOptions {
abbreviateBlobs?: boolean;
classIdsToClassNames?: boolean;
useJsName?: boolean;
}

// @public
export class RpcTrace {
static get currentActivity(): RpcActivity | undefined;
Expand Down
16 changes: 16 additions & 0 deletions common/api/summary/core-backend.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,27 @@ preview;class;Category
public;class;CategoryOwnsSubCategories
public;class;CategorySelector
preview;class;CategorySelector
beta;interface;ChangeCache
beta;interface;ChangedECInstance
deprecated;interface;ChangedECInstance
internal;class;ChangedElementsDb
beta;interface;ChangeFormatArgs
beta;interface;ChangeInstance
beta;interface;ChangeInstanceKey
beta;interface;ChangeMeta
beta;interface;ChangeMetaData
deprecated;interface;ChangeMetaData
public;interface;ChangesetArg
beta;class;ChangesetECAdaptor
deprecated;class;ChangesetECAdaptor
internal;interface;ChangesetIndexArg
public;interface;ChangesetRangeArg
beta;class;ChangesetReader
beta;interface;ChangesetReaderArgs
beta;interface;ChangeSource
beta;interface;ChangeSummary
beta;class;ChangeSummaryManager
beta;namespace;ChangeUnifierCache
beta;interface;ChannelControl
beta;namespace;ChannelControl
beta;type;ChannelKey
Expand Down Expand Up @@ -170,7 +180,9 @@ public;class;DrawingViewDefinition
preview;class;DrawingViewDefinition
beta;class;DriverBundleElement
beta;interface;ECChangeUnifierCache
deprecated;interface;ECChangeUnifierCache
beta;namespace;ECChangeUnifierCache
deprecated;namespace;ECChangeUnifierCache
public;class;ECDb
public;enum;ECDbOpenMode
public;interface;ECEnumValue
Expand Down Expand Up @@ -439,7 +451,9 @@ public;type;OpenBriefcaseArgs
public;class;OrthographicViewDefinition
preview;class;OrthographicViewDefinition
internal;function;parseTextAnnotationData
beta;class;PartialChangeUnifier
beta;class;PartialECChangeUnifier
deprecated;class;PartialECChangeUnifier
public;class;PhysicalElement
preview;class;PhysicalElement
public;class;PhysicalElementAssemblesElements
Expand All @@ -466,6 +480,7 @@ public;type;ProgressFunction
public;enum;ProgressStatus
beta;class;ProjectInformationRecord
beta;interface;ProjectInformationRecordCreateArgs
beta;enum;PropertyFilter
public;type;PropertyHandler
preview;type;PropertyHandler
beta;namespace;PropertyStore
Expand Down Expand Up @@ -498,6 +513,7 @@ public;class;RoleElement
preview;class;RoleElement
public;class;RoleModel
preview;class;RoleModel
beta;interface;RowFormatOptions
public;class;RpcTrace
beta;class;RunLayout
public;class;Schema
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-backend",
"comment": "Added ChangesetReader api(along with new unifier apis) and deprecated ChangesetECAdaptor apis(including unifier apis)",
"type": "none"
}
],
"packageName": "@itwin/core-backend"
}
11 changes: 7 additions & 4 deletions core/backend/src/BriefcaseManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ interface PatchInstanceKey {
*/
interface ChangedInstanceForSemanticRebase {
isIndirect: boolean;
instance: ChangedECInstance;
instance: ChangedECInstance; // eslint-disable-line @typescript-eslint/no-deprecated
}

/** The argument for patch instances during high level rebase application
Expand Down Expand Up @@ -921,16 +921,19 @@ export class BriefcaseManager {
const reader = SqliteChangesetReader.openTxn({
txnId, db, disableSchemaCheck: true
});
// eslint-disable-next-line @typescript-eslint/no-deprecated
const adaptor = new ChangesetECAdaptor(reader);
// eslint-disable-next-line @typescript-eslint/no-deprecated
using indirectUnifier = new PartialECChangeUnifier(reader.db, ECChangeUnifierCache.createInMemoryCache());
// eslint-disable-next-line @typescript-eslint/no-deprecated
using directUnifier = new PartialECChangeUnifier(reader.db, ECChangeUnifierCache.createInMemoryCache());
while (adaptor.step()) {
if (adaptor.reader.isIndirect)
indirectUnifier.appendFrom(adaptor);
indirectUnifier.appendFrom(adaptor); // eslint-disable-line @typescript-eslint/no-deprecated
else
directUnifier.appendFrom(adaptor);
directUnifier.appendFrom(adaptor); // eslint-disable-line @typescript-eslint/no-deprecated
}
return [...Array.from(directUnifier.instances).map((instance) => ({ isIndirect: false, instance })), ...Array.from(indirectUnifier.instances).map((instance) => ({ isIndirect: true, instance }))];
return [...Array.from(directUnifier.instances).map((instance) => ({ isIndirect: false, instance })), ...Array.from(indirectUnifier.instances).map((instance) => ({ isIndirect: true, instance }))]; // eslint-disable-line @typescript-eslint/no-deprecated
}

/**
Expand Down
Loading
Loading