@itwin/core-backend 4.8.0-dev.16 → 4.8.0-dev.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +4 -2
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +0 -6
- package/lib/cjs/Category.d.ts.map +1 -1
- package/lib/cjs/Category.js +0 -6
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
- package/lib/cjs/ChangedElementsDb.js +2 -1
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChannelControl.d.ts +4 -26
- package/lib/cjs/ChannelControl.d.ts.map +1 -1
- package/lib/cjs/ChannelControl.js +2 -101
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +2 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/DevTools.d.ts.map +1 -1
- package/lib/cjs/DevTools.js +2 -1
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +0 -3
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +0 -3
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js +2 -2
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +2 -2
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +6 -3
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +3 -3
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +2 -59
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +7 -63
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +0 -5
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +4 -8
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
- package/lib/cjs/GeoCoordConfig.js +2 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeographicCRSServices.js +2 -2
- package/lib/cjs/GeographicCRSServices.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +11 -86
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +47 -30
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +2 -2
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +5 -3
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +16 -18
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +2 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LockControl.d.ts +65 -0
- package/lib/cjs/LockControl.d.ts.map +1 -0
- package/lib/cjs/LockControl.js +11 -0
- package/lib/cjs/LockControl.js.map +1 -0
- package/lib/cjs/Material.d.ts +2 -5
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +1 -4
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +0 -22
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +4 -25
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +0 -12
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +0 -12
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +3 -3
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/SchemaSync.js +2 -2
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SchemaUtils.js +3 -3
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js +2 -2
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.js +2 -2
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +2 -1
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +1 -0
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +1 -18
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +1 -18
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/core-backend.d.ts +1 -1
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +2 -5
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.d.ts +0 -10
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +0 -10
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/GenericElements.d.ts +0 -18
- package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
- package/lib/cjs/domains/GenericElements.js +0 -18
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts +24 -0
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js +7 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts +34 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -0
- package/lib/cjs/internal/ChannelAdmin.js +117 -0
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -0
- package/lib/cjs/internal/NativePlatform.d.ts +15 -0
- package/lib/cjs/internal/NativePlatform.d.ts.map +1 -0
- package/lib/cjs/internal/NativePlatform.js +49 -0
- package/lib/cjs/internal/NativePlatform.js.map +1 -0
- package/lib/cjs/internal/NoLocks.d.ts +6 -0
- package/lib/cjs/internal/NoLocks.d.ts.map +1 -0
- package/lib/cjs/internal/NoLocks.js +30 -0
- package/lib/cjs/internal/NoLocks.js.map +1 -0
- package/lib/cjs/{ServerBasedLocks.d.ts → internal/ServerBasedLocks.d.ts} +9 -16
- package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -0
- package/lib/cjs/{ServerBasedLocks.js → internal/ServerBasedLocks.js} +13 -7
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -0
- package/lib/cjs/internal/Symbols.d.ts +9 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -0
- package/lib/cjs/internal/Symbols.js +19 -0
- package/lib/cjs/internal/Symbols.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +3 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -0
- package/lib/cjs/internal/cross-package.js +14 -0
- package/lib/cjs/internal/cross-package.js.map +1 -0
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts +2 -2
- package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js +3 -3
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +2 -2
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js +5 -5
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/rpc/tracing.js +1 -1
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +4 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +2 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +3 -3
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js +1 -1
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.d.ts +2 -2
- package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +4 -4
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.d.ts +2 -2
- package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
- package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
- package/package.json +13 -13
- package/lib/cjs/ServerBasedLocks.d.ts.map +0 -1
- package/lib/cjs/ServerBasedLocks.js.map +0 -1
- package/lib/cjs/internal/ImplementationProhibited.d.ts +0 -44
- package/lib/cjs/internal/ImplementationProhibited.d.ts.map +0 -1
- package/lib/cjs/internal/ImplementationProhibited.js +0 -51
- package/lib/cjs/internal/ImplementationProhibited.js.map +0 -1
package/lib/cjs/IModelDb.js
CHANGED
|
@@ -17,6 +17,7 @@ const core_geometry_1 = require("@itwin/core-geometry");
|
|
|
17
17
|
const BackendLoggerCategory_1 = require("./BackendLoggerCategory");
|
|
18
18
|
const BriefcaseManager_1 = require("./BriefcaseManager");
|
|
19
19
|
const ChannelControl_1 = require("./ChannelControl");
|
|
20
|
+
const ChannelAdmin_1 = require("./internal/ChannelAdmin");
|
|
20
21
|
const CheckpointManager_1 = require("./CheckpointManager");
|
|
21
22
|
const ClassRegistry_1 = require("./ClassRegistry");
|
|
22
23
|
const CloudSqlite_1 = require("./CloudSqlite");
|
|
@@ -34,7 +35,7 @@ const IpcHost_1 = require("./IpcHost");
|
|
|
34
35
|
const Model_1 = require("./Model");
|
|
35
36
|
const Relationship_1 = require("./Relationship");
|
|
36
37
|
const SchemaSync_1 = require("./SchemaSync");
|
|
37
|
-
const ServerBasedLocks_1 = require("./ServerBasedLocks");
|
|
38
|
+
const ServerBasedLocks_1 = require("./internal/ServerBasedLocks");
|
|
38
39
|
const SqliteStatement_1 = require("./SqliteStatement");
|
|
39
40
|
const TxnManager_1 = require("./TxnManager");
|
|
40
41
|
const ViewDefinition_1 = require("./ViewDefinition");
|
|
@@ -43,21 +44,11 @@ const Settings_1 = require("./workspace/Settings");
|
|
|
43
44
|
const Workspace_1 = require("./workspace/Workspace");
|
|
44
45
|
const WorkspaceImpl_1 = require("./internal/workspace/WorkspaceImpl");
|
|
45
46
|
const SettingsImpl_1 = require("./internal/workspace/SettingsImpl");
|
|
47
|
+
const NativePlatform_1 = require("./internal/NativePlatform");
|
|
48
|
+
const NoLocks_1 = require("./internal/NoLocks");
|
|
49
|
+
const Symbols_1 = require("./internal/Symbols");
|
|
46
50
|
// spell:ignore fontid fontmap
|
|
47
51
|
const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelDb;
|
|
48
|
-
/** A null-implementation of LockControl that does not attempt to limit access between briefcases. This relies on change-merging to resolve conflicts. */
|
|
49
|
-
class NoLocks {
|
|
50
|
-
get isServerBased() { return false; }
|
|
51
|
-
close() { }
|
|
52
|
-
clearAllLocks() { }
|
|
53
|
-
holdsExclusiveLock() { return false; }
|
|
54
|
-
holdsSharedLock() { return false; }
|
|
55
|
-
checkExclusiveLock() { }
|
|
56
|
-
checkSharedLock() { }
|
|
57
|
-
elementWasCreated() { }
|
|
58
|
-
async acquireLocks() { }
|
|
59
|
-
async releaseAllLocks() { }
|
|
60
|
-
}
|
|
61
52
|
/** @internal */
|
|
62
53
|
var BriefcaseLocalValue;
|
|
63
54
|
(function (BriefcaseLocalValue) {
|
|
@@ -178,12 +169,12 @@ class IModelDb extends core_common_1.IModel {
|
|
|
178
169
|
this.views = new IModelDb.Views(this);
|
|
179
170
|
this.tiles = new IModelDb.Tiles(this);
|
|
180
171
|
/** @beta */
|
|
181
|
-
this.channels =
|
|
172
|
+
this.channels = (0, ChannelAdmin_1.createChannelControl)(this);
|
|
182
173
|
this._statementCache = new SqliteStatement_1.StatementCache();
|
|
183
174
|
this._sqliteStatementCache = new SqliteStatement_1.StatementCache();
|
|
184
175
|
this._snaps = new Map();
|
|
185
176
|
/** @internal */
|
|
186
|
-
this._locks =
|
|
177
|
+
this._locks = (0, NoLocks_1.createNoOpLockControl)();
|
|
187
178
|
/** Event called after a changeset is applied to this IModelDb. */
|
|
188
179
|
this.onChangesetApplied = new core_bentley_1.BeEvent();
|
|
189
180
|
/** Event called when the iModel is about to be closed. */
|
|
@@ -224,7 +215,7 @@ class IModelDb extends core_common_1.IModel {
|
|
|
224
215
|
this.beforeClose();
|
|
225
216
|
IModelDb._openDbs.delete(this._fileKey);
|
|
226
217
|
this._workspace?.close();
|
|
227
|
-
this.locks.
|
|
218
|
+
this.locks[Symbols_1._close]();
|
|
228
219
|
this._locks = undefined;
|
|
229
220
|
this._codeService?.close();
|
|
230
221
|
this._codeService = undefined;
|
|
@@ -500,7 +491,32 @@ class IModelDb extends core_common_1.IModel {
|
|
|
500
491
|
return stmt;
|
|
501
492
|
}
|
|
502
493
|
/**
|
|
503
|
-
* queries the BisCore.SubCategory table for
|
|
494
|
+
* queries the BisCore.SubCategory table for entries that are children of used spatial categories and 3D elements.
|
|
495
|
+
* @returns array of SubCategoryResultRow
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
498
|
+
async queryAllUsedSpatialSubCategories() {
|
|
499
|
+
const result = [];
|
|
500
|
+
const parentCategoriesQuery = `SELECT DISTINCT Category.Id AS id FROM BisCore.GeometricElement3d WHERE Category.Id IN (SELECT ECInstanceId FROM BisCore.SpatialCategory)`;
|
|
501
|
+
const parentCategories = [];
|
|
502
|
+
for await (const row of this.createQueryReader(parentCategoriesQuery)) {
|
|
503
|
+
parentCategories.push(row.id);
|
|
504
|
+
}
|
|
505
|
+
;
|
|
506
|
+
const where = [...parentCategories].join(",");
|
|
507
|
+
const query = `SELECT ECInstanceId as id, Parent.Id as parentId, Properties as appearance FROM BisCore.SubCategory WHERE Parent.Id IN (${where})`;
|
|
508
|
+
try {
|
|
509
|
+
for await (const row of this.createQueryReader(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames })) {
|
|
510
|
+
result.push(row.toRow());
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
catch {
|
|
514
|
+
// We can ignore the error here, and just return whatever we were able to query.
|
|
515
|
+
}
|
|
516
|
+
return result;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* queries the BisCore.SubCategory table for the entries that are children of the passed categoryIds.
|
|
504
520
|
* @param categoryIds categoryIds to query
|
|
505
521
|
* @returns array of SubCategoryResultRow
|
|
506
522
|
* @internal
|
|
@@ -782,7 +798,7 @@ class IModelDb extends core_common_1.IModel {
|
|
|
782
798
|
if (isUpgradeRequested && openMode !== core_bentley_1.OpenMode.ReadWrite)
|
|
783
799
|
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.UpgradeFailed, "Cannot upgrade a Readonly Db");
|
|
784
800
|
try {
|
|
785
|
-
const nativeDb = new
|
|
801
|
+
const nativeDb = new NativePlatform_1.IModelNative.platform.DgnDb();
|
|
786
802
|
const container = props?.container;
|
|
787
803
|
if (container) {
|
|
788
804
|
// temp files for cloud-based Dbs should be in the profileDir in a subdirectory named for their container
|
|
@@ -1047,7 +1063,7 @@ class IModelDb extends core_common_1.IModel {
|
|
|
1047
1063
|
async requestSnap(sessionId, props) {
|
|
1048
1064
|
let request = this._snaps.get(sessionId);
|
|
1049
1065
|
if (undefined === request) {
|
|
1050
|
-
request = new
|
|
1066
|
+
request = new NativePlatform_1.IModelNative.platform.SnapRequest();
|
|
1051
1067
|
this._snaps.set(sessionId, request);
|
|
1052
1068
|
}
|
|
1053
1069
|
else
|
|
@@ -2287,7 +2303,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2287
2303
|
// if the iModel uses a lock server, create a ServerBasedLocks LockControl for this BriefcaseDb.
|
|
2288
2304
|
makeLockControl() {
|
|
2289
2305
|
if (this.useLockServer)
|
|
2290
|
-
this._locks =
|
|
2306
|
+
this._locks = (0, ServerBasedLocks_1.createServerBasedLocks)(this);
|
|
2291
2307
|
}
|
|
2292
2308
|
constructor(args) {
|
|
2293
2309
|
super({ ...args, changeset: args.nativeDb.getCurrentChangeset() });
|
|
@@ -2358,7 +2374,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2358
2374
|
await this.doUpgrade(briefcase, { domain: core_common_1.DomainOptions.Upgrade, schemaLockHeld: true }, "Upgraded domain schemas");
|
|
2359
2375
|
}
|
|
2360
2376
|
finally {
|
|
2361
|
-
await withBriefcaseDb(briefcase, async (db) => db.locks.
|
|
2377
|
+
await withBriefcaseDb(briefcase, async (db) => db.locks[Symbols_1._releaseAllLocks]());
|
|
2362
2378
|
}
|
|
2363
2379
|
return;
|
|
2364
2380
|
}
|
|
@@ -2375,7 +2391,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2375
2391
|
await this.doUpgrade(briefcase, { domain: core_common_1.DomainOptions.Upgrade, schemaLockHeld: true }, "Upgraded domain schemas");
|
|
2376
2392
|
}
|
|
2377
2393
|
finally {
|
|
2378
|
-
await withBriefcaseDb(briefcase, async (db) => db.locks.
|
|
2394
|
+
await withBriefcaseDb(briefcase, async (db) => db.locks[Symbols_1._releaseAllLocks]());
|
|
2379
2395
|
}
|
|
2380
2396
|
}
|
|
2381
2397
|
throw error;
|
|
@@ -2399,6 +2415,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2399
2415
|
// Restart default txn to trigger events when watch file is changed by some other process.
|
|
2400
2416
|
const watcher = fs.watch(briefcaseDb.watchFilePathName, { persistent: false }, () => {
|
|
2401
2417
|
nativeDb.restartDefaultTxn();
|
|
2418
|
+
briefcaseDb.changeset = briefcaseDb.nativeDb.getCurrentChangeset();
|
|
2402
2419
|
});
|
|
2403
2420
|
// Stop the watcher when we close this connection.
|
|
2404
2421
|
briefcaseDb.onBeforeClose.addOnce(() => {
|
|
@@ -2435,9 +2452,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2435
2452
|
this.onOpened.raiseEvent(briefcaseDb, args);
|
|
2436
2453
|
return briefcaseDb;
|
|
2437
2454
|
}
|
|
2438
|
-
/** This is called by native code when applying a changeset
|
|
2439
|
-
* @internal
|
|
2440
|
-
*/
|
|
2455
|
+
/** This is called by native code when applying a changeset */
|
|
2441
2456
|
onChangesetConflict(args) {
|
|
2442
2457
|
// returning undefined will result in native handler to resolve conflict
|
|
2443
2458
|
const category = "DgnCore";
|
|
@@ -2595,7 +2610,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2595
2610
|
finally {
|
|
2596
2611
|
if (isReadonly) {
|
|
2597
2612
|
if (locks !== this._locks) { // did we have to create a ServerBasedLocks?
|
|
2598
|
-
this.locks.
|
|
2613
|
+
this.locks[Symbols_1._close](); // yes, close it and reset back to previous
|
|
2599
2614
|
this._locks = locks;
|
|
2600
2615
|
}
|
|
2601
2616
|
this.closeAndReopen(core_bentley_1.OpenMode.Readonly, fileName);
|
|
@@ -2624,6 +2639,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2624
2639
|
this.initializeIModelDb();
|
|
2625
2640
|
});
|
|
2626
2641
|
IpcHost_1.IpcHost.notifyTxns(this, "notifyPulledChanges", this.changeset);
|
|
2642
|
+
this.txns.touchWatchFile();
|
|
2627
2643
|
}
|
|
2628
2644
|
/** Push changes to iModelHub. */
|
|
2629
2645
|
async pushChanges(arg) {
|
|
@@ -2640,6 +2656,7 @@ class BriefcaseDb extends IModelDb {
|
|
|
2640
2656
|
});
|
|
2641
2657
|
const changeset = this.changeset;
|
|
2642
2658
|
IpcHost_1.IpcHost.notifyTxns(this, "notifyPushedChanges", changeset);
|
|
2659
|
+
this.txns.touchWatchFile();
|
|
2643
2660
|
}
|
|
2644
2661
|
close() {
|
|
2645
2662
|
super.close();
|
|
@@ -2741,7 +2758,7 @@ class SnapshotDb extends IModelDb {
|
|
|
2741
2758
|
* @see [Snapshot iModels]($docs/learning/backend/AccessingIModels.md#snapshot-imodels)
|
|
2742
2759
|
*/
|
|
2743
2760
|
static createEmpty(filePath, options) {
|
|
2744
|
-
const nativeDb = new
|
|
2761
|
+
const nativeDb = new NativePlatform_1.IModelNative.platform.DgnDb();
|
|
2745
2762
|
nativeDb.createIModel(filePath, options);
|
|
2746
2763
|
nativeDb.resetBriefcaseId(core_common_1.BriefcaseIdValue.Unassigned);
|
|
2747
2764
|
const snapshotDb = new SnapshotDb(nativeDb, core_bentley_1.Guid.createValue());
|
|
@@ -2762,7 +2779,7 @@ class SnapshotDb extends IModelDb {
|
|
|
2762
2779
|
static createFrom(iModelDb, snapshotFile, options) {
|
|
2763
2780
|
iModelDb.performCheckpoint();
|
|
2764
2781
|
IModelJsFs_1.IModelJsFs.copySync(iModelDb.pathName, snapshotFile);
|
|
2765
|
-
const nativeDb = new
|
|
2782
|
+
const nativeDb = new NativePlatform_1.IModelNative.platform.DgnDb();
|
|
2766
2783
|
nativeDb.openIModel(snapshotFile, core_bentley_1.OpenMode.ReadWrite, undefined, options);
|
|
2767
2784
|
nativeDb.vacuum();
|
|
2768
2785
|
// Replace iModelId if seedFile is a snapshot, preserve iModelId if seedFile is an iModelHub-managed briefcase
|
|
@@ -2896,7 +2913,7 @@ class StandaloneDb extends BriefcaseDb {
|
|
|
2896
2913
|
* @param args The parameters that define the new iModel
|
|
2897
2914
|
*/
|
|
2898
2915
|
static createEmpty(filePath, args) {
|
|
2899
|
-
const nativeDb = new
|
|
2916
|
+
const nativeDb = new NativePlatform_1.IModelNative.platform.DgnDb();
|
|
2900
2917
|
nativeDb.createIModel(filePath, args);
|
|
2901
2918
|
nativeDb.saveLocalValue(BriefcaseLocalValue.StandaloneEdit, args.allowEdit);
|
|
2902
2919
|
nativeDb.setITwinId(core_bentley_1.Guid.empty);
|