@itwin/linear-referencing-backend 5.10.0-dev.9 → 5.11.0-dev.1

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.
@@ -40,7 +40,7 @@ export declare class LinearLocation extends LinearLocationElement implements Lin
40
40
  */
41
41
  static insertFromTo(txn: EditTxn, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
42
42
  /** Insert a new `LinearLocation`.
43
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearLocation.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
43
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearLocation.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
44
44
  */
45
45
  static insertFromTo(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
46
46
  /** Insert this `LinearLocation` using an explicit transaction.
@@ -48,7 +48,7 @@ export declare class LinearLocation extends LinearLocationElement implements Lin
48
48
  */
49
49
  insertFromTo(txn: EditTxn, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
50
50
  /** Insert this `LinearLocation`.
51
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearLocation.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
51
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearLocation.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
52
52
  */
53
53
  insertFromTo(iModel: IModelDb, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps, locatedElementId: Id64String): Id64String;
54
54
  /** Insert a new `LinearLocation` using an explicit transaction.
@@ -56,7 +56,7 @@ export declare class LinearLocation extends LinearLocationElement implements Lin
56
56
  */
57
57
  static insertAt(txn: EditTxn, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
58
58
  /** Insert a new `LinearLocation`.
59
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearLocation.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
59
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearLocation.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
60
60
  */
61
61
  static insertAt(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
62
62
  /** Insert this `LinearLocation` using an explicit transaction.
@@ -64,7 +64,7 @@ export declare class LinearLocation extends LinearLocationElement implements Lin
64
64
  */
65
65
  insertAt(txn: EditTxn, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
66
66
  /** Insert this `LinearLocation`.
67
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearLocation.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
67
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearLocation.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
68
68
  */
69
69
  insertAt(iModel: IModelDb, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, locatedElementId: Id64String): Id64String;
70
70
  }
@@ -100,7 +100,7 @@ export declare class Referent extends ReferentElement {
100
100
  */
101
101
  static insertAt(txn: EditTxn, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, referencedElementId: Id64String): Id64String;
102
102
  /** Insert a new `Referent`.
103
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use Referent.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
103
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use Referent.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
104
104
  */
105
105
  static insertAt(iModel: IModelDb, modelId: Id64String, categoryId: Id64String, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps, referencedElementId: Id64String): Id64String;
106
106
  /** Insert this `Referent` using an explicit transaction.
@@ -108,7 +108,7 @@ export declare class Referent extends ReferentElement {
108
108
  */
109
109
  insertAt(txn: EditTxn, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps): Id64String;
110
110
  /** Insert this `Referent`.
111
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use Referent.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
111
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use Referent.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
112
112
  */
113
113
  insertAt(iModel: IModelDb, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps): Id64String;
114
114
  }
@@ -133,7 +133,7 @@ export declare class LinearlyLocated {
133
133
  * @param atPosition Linear position.
134
134
  * @returns The newly inserted element's Id.
135
135
  * @throws [[IModelError]] if unable to insert the element.
136
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearlyLocated.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
136
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearlyLocated.insertAt(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
137
137
  */
138
138
  static insertAt(iModel: IModelDb, elProps: ElementProps, linearElementId: Id64String, atPosition: LinearlyReferencedAtLocationProps): Id64String;
139
139
  /** Insert a new LinearlyLocated element into an iModel at a specific from-to location along an existing Linear-Element.
@@ -152,7 +152,7 @@ export declare class LinearlyLocated {
152
152
  * @param fromToPosition Linear position.
153
153
  * @returns The newly inserted element's Id.
154
154
  * @throws [[IModelError]] if unable to insert the element.
155
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearlyLocated.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
155
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearlyLocated.insertFromTo(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
156
156
  */
157
157
  static insertFromTo(iModel: IModelDb, elProps: ElementProps, linearElementId: Id64String, fromToPosition: LinearlyReferencedFromToLocationProps): Id64String;
158
158
  private static getLinearLocations;
@@ -177,7 +177,7 @@ export declare class LinearlyLocated {
177
177
  * @param linearLocationProps The properties to use to update the LinearlyReferencedAtLocation aspect.
178
178
  * @param aspectId The Id of the aspect to update. If not known, the first aspectId will be looked-up.
179
179
  * @throws [[IModelError]]
180
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearlyLocated.updateAtLocation(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
180
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearlyLocated.updateAtLocation(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
181
181
  */
182
182
  static updateAtLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedAtLocationProps, aspectId?: Id64String): void;
183
183
  static updateAtLocation(txn: EditTxn, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedAtLocationProps, aspectId?: Id64String): void;
@@ -187,7 +187,7 @@ export declare class LinearlyLocated {
187
187
  * @param linearLocationProps The properties to use to update the LinearlyReferencedFromToLocation aspect.
188
188
  * @param aspectId The Id of the aspect to update. If not known, the first aspectId will be looked-up.
189
189
  * @throws [[IModelError]]
190
- * @deprecated in 5.1.9 - will not be removed until after 2027-05-04. Use LinearlyLocated.updateFromToLocation(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
190
+ * @deprecated in 5.9.0 - will not be removed until after 2027-05-04. Use LinearlyLocated.updateFromToLocation(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
191
191
  */
192
192
  static updateFromToLocation(iModel: IModelDb, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedFromToLocationProps, aspectId?: Id64String): void;
193
193
  static updateFromToLocation(txn: EditTxn, linearlyLocatedElementId: Id64String, linearLocationProps: LinearlyReferencedFromToLocationProps, aspectId?: Id64String): void;
@@ -1 +1 @@
1
- {"version":3,"file":"LinearReferencingElements.d.ts","sourceRoot":"","sources":["../../src/LinearReferencingElements.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAgC,OAAO,EAAiB,QAAQ,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC9I,OAAO,EAAQ,YAAY,EAAE,uBAAuB,EAAe,oBAAoB,EAAkB,MAAM,oBAAoB,CAAC;AACpI,OAAO,EACa,uBAAuB,EAAE,+BAA+B,EAC1E,iCAAiC,EAA+C,qCAAqC,EACrF,WAAW,EAAE,oBAAoB,EAClE,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACnH,OAAO,EAC+D,iCAAiC,EAAE,0BAA0B,EAClI,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,8BAAsB,0BAA2B,SAAQ,sBAAsB;IAC7E,gBAAgB;IAChB,WAA2B,S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iCAAiC,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAClG;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,cAAc,IAAI,4BAA4B,EAAE,CAAC;IACjD,gBAAgB,CAAC,cAAc,EAAE,iCAAiC,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;CACjG;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,iBAAiB,IAAI,gCAAgC,GAAG,SAAS,CAAC;IAClE,oBAAoB,CAAC,cAAc,EAAE,qCAAqC,EAAE,QAAQ,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC1G;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE,kBAAkB,IAAI,gCAAgC,EAAE,CAAC;IACzD,oBAAoB,CAAC,cAAc,EAAE,qCAAqC,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI,CAAC;CACzG;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB;;;OAGG;WACW,oBAAoB,CAAC,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,GAAG,uBAAuB,EAAE;CAwBvI"}
@@ -6,7 +6,7 @@
6
6
  * @module LinearReferencing
7
7
  */
8
8
  import { assert, DbResult } from "@itwin/core-bentley";
9
- import { _implicitTxn, EditTxn, PhysicalElement, SpatialLocationElement } from "@itwin/core-backend";
9
+ import { EditTxn, PhysicalElement, SpatialLocationElement } from "@itwin/core-backend";
10
10
  import { Code, IModelError, RelatedElement } from "@itwin/core-common";
11
11
  import { ComparisonOption, LinearlyReferencedLocationType, } from "@itwin/linear-referencing-common";
12
12
  import { LinearlyReferencedAtLocation, LinearlyReferencedFromToLocation } from "./LinearReferencingElementAspects";
@@ -61,28 +61,52 @@ export class LinearLocation extends LinearLocationElement {
61
61
  return new LinearLocation(this.toProps(modelId, categoryId), iModel);
62
62
  }
63
63
  static insertFromTo(txnOrIModel, modelId, categoryId, linearElementId, fromToPosition, locatedElementId) {
64
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
65
- const newId = LinearlyLocated.insertFromTo(txn, this.toProps(modelId, categoryId), linearElementId, fromToPosition);
66
- ILinearLocationLocatesElement.insert(txn, newId, locatedElementId);
67
- return newId;
64
+ if (txnOrIModel instanceof EditTxn) {
65
+ const newId = LinearlyLocated.insertFromTo(txnOrIModel, this.toProps(modelId, categoryId), linearElementId, fromToPosition);
66
+ ILinearLocationLocatesElement.insert(txnOrIModel, newId, locatedElementId);
67
+ return newId;
68
+ }
69
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
70
+ const iModelNewId = LinearlyLocated.insertFromTo(txnOrIModel, this.toProps(modelId, categoryId), linearElementId, fromToPosition);
71
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
72
+ ILinearLocationLocatesElement.insert(txnOrIModel, iModelNewId, locatedElementId);
73
+ return iModelNewId;
68
74
  }
69
75
  insertFromTo(txnOrIModel, linearElementId, fromToPosition, locatedElementId) {
70
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
71
- const newId = LinearlyLocated.insertFromTo(txn, this.toJSON(), linearElementId, fromToPosition);
72
- ILinearLocationLocatesElement.insert(txn, newId, locatedElementId);
73
- return newId;
76
+ if (txnOrIModel instanceof EditTxn) {
77
+ const newId = LinearlyLocated.insertFromTo(txnOrIModel, this.toJSON(), linearElementId, fromToPosition);
78
+ ILinearLocationLocatesElement.insert(txnOrIModel, newId, locatedElementId);
79
+ return newId;
80
+ }
81
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
82
+ const iModelNewId = LinearlyLocated.insertFromTo(txnOrIModel, this.toJSON(), linearElementId, fromToPosition);
83
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
84
+ ILinearLocationLocatesElement.insert(txnOrIModel, iModelNewId, locatedElementId);
85
+ return iModelNewId;
74
86
  }
75
87
  static insertAt(txnOrIModel, modelId, categoryId, linearElementId, atPosition, locatedElementId) {
76
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
77
- const newId = LinearlyLocated.insertAt(txn, this.toProps(modelId, categoryId), linearElementId, atPosition);
78
- ILinearLocationLocatesElement.insert(txn, newId, locatedElementId);
79
- return newId;
88
+ if (txnOrIModel instanceof EditTxn) {
89
+ const newId = LinearlyLocated.insertAt(txnOrIModel, this.toProps(modelId, categoryId), linearElementId, atPosition);
90
+ ILinearLocationLocatesElement.insert(txnOrIModel, newId, locatedElementId);
91
+ return newId;
92
+ }
93
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
94
+ const iModelNewId = LinearlyLocated.insertAt(txnOrIModel, this.toProps(modelId, categoryId), linearElementId, atPosition);
95
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
96
+ ILinearLocationLocatesElement.insert(txnOrIModel, iModelNewId, locatedElementId);
97
+ return iModelNewId;
80
98
  }
81
99
  insertAt(txnOrIModel, linearElementId, atPosition, locatedElementId) {
82
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
83
- const newId = LinearlyLocated.insertAt(txn, this.toJSON(), linearElementId, atPosition);
84
- ILinearLocationLocatesElement.insert(txn, newId, locatedElementId);
85
- return newId;
100
+ if (txnOrIModel instanceof EditTxn) {
101
+ const newId = LinearlyLocated.insertAt(txnOrIModel, this.toJSON(), linearElementId, atPosition);
102
+ ILinearLocationLocatesElement.insert(txnOrIModel, newId, locatedElementId);
103
+ return newId;
104
+ }
105
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
106
+ const iModelNewId = LinearlyLocated.insertAt(txnOrIModel, this.toJSON(), linearElementId, atPosition);
107
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
108
+ ILinearLocationLocatesElement.insert(txnOrIModel, iModelNewId, locatedElementId);
109
+ return iModelNewId;
86
110
  }
87
111
  }
88
112
  /** Base class for Physical Elements that are inherently linearly located along a Linear-Element.
@@ -133,12 +157,16 @@ export class Referent extends ReferentElement {
133
157
  return new Referent(this.toProps(modelId, categoryId, referencedElementId), iModel);
134
158
  }
135
159
  static insertAt(txnOrIModel, modelId, categoryId, linearElementId, atPosition, referencedElementId) {
136
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
137
- return LinearlyLocated.insertAt(txn, this.toProps(modelId, categoryId, referencedElementId), linearElementId, atPosition);
160
+ if (txnOrIModel instanceof EditTxn)
161
+ return LinearlyLocated.insertAt(txnOrIModel, this.toProps(modelId, categoryId, referencedElementId), linearElementId, atPosition);
162
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
163
+ return LinearlyLocated.insertAt(txnOrIModel, this.toProps(modelId, categoryId, referencedElementId), linearElementId, atPosition);
138
164
  }
139
165
  insertAt(txnOrIModel, linearElementId, atPosition) {
140
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
141
- return LinearlyLocated.insertAt(txn, this.toJSON(), linearElementId, atPosition);
166
+ if (txnOrIModel instanceof EditTxn)
167
+ return LinearlyLocated.insertAt(txnOrIModel, this.toJSON(), linearElementId, atPosition);
168
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
169
+ return LinearlyLocated.insertAt(txnOrIModel, this.toJSON(), linearElementId, atPosition);
142
170
  }
143
171
  }
144
172
  class ECSQLGenImpl {
@@ -413,22 +441,39 @@ class QueryLinearLocationsECSQLGen {
413
441
  * @beta
414
442
  */
415
443
  export class LinearlyLocated {
416
- static insertBasic(txn, elProps, linearElementId) {
417
- const newId = txn.insertElement(elProps);
418
- const linearlyLocatedAlongLinearElement = ILinearlyLocatedAlongILinearElement.create(txn.iModel, newId, linearElementId);
419
- linearlyLocatedAlongLinearElement.insert(txn);
444
+ static insertBasic(txnOrIModel, elProps, linearElementId) {
445
+ const newId = txnOrIModel instanceof EditTxn
446
+ ? txnOrIModel.insertElement(elProps)
447
+ : (() => {
448
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
449
+ return txnOrIModel.elements.insertElement(elProps);
450
+ })();
451
+ if (txnOrIModel instanceof EditTxn)
452
+ ILinearlyLocatedAlongILinearElement.insert(txnOrIModel, newId, linearElementId);
453
+ else {
454
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
455
+ ILinearlyLocatedAlongILinearElement.insert(txnOrIModel, newId, linearElementId);
456
+ }
420
457
  return newId;
421
458
  }
422
459
  static insertAt(txnOrIModel, elProps, linearElementId, atPosition) {
423
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
424
- const newId = this.insertBasic(txn, elProps, linearElementId);
425
- LinearlyReferencedAtLocation.insert(txn, newId, atPosition.atPosition, atPosition.fromReferent === undefined ? undefined : atPosition.fromReferent.id);
460
+ const newId = this.insertBasic(txnOrIModel, elProps, linearElementId);
461
+ if (txnOrIModel instanceof EditTxn)
462
+ LinearlyReferencedAtLocation.insert(txnOrIModel, newId, atPosition.atPosition, atPosition.fromReferent === undefined ? undefined : atPosition.fromReferent.id);
463
+ else {
464
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
465
+ LinearlyReferencedAtLocation.insert(txnOrIModel, newId, atPosition.atPosition, atPosition.fromReferent === undefined ? undefined : atPosition.fromReferent.id);
466
+ }
426
467
  return newId;
427
468
  }
428
469
  static insertFromTo(txnOrIModel, elProps, linearElementId, fromToPosition) {
429
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
430
- const newId = this.insertBasic(txn, elProps, linearElementId);
431
- LinearlyReferencedFromToLocation.insert(txn, newId, fromToPosition.fromPosition, fromToPosition.toPosition, fromToPosition.fromPositionFromReferent === undefined ? undefined : fromToPosition.fromPositionFromReferent.id, fromToPosition.toPositionFromReferent === undefined ? undefined : fromToPosition.toPositionFromReferent.id);
470
+ const newId = this.insertBasic(txnOrIModel, elProps, linearElementId);
471
+ if (txnOrIModel instanceof EditTxn)
472
+ LinearlyReferencedFromToLocation.insert(txnOrIModel, newId, fromToPosition.fromPosition, fromToPosition.toPosition, fromToPosition.fromPositionFromReferent === undefined ? undefined : fromToPosition.fromPositionFromReferent.id, fromToPosition.toPositionFromReferent === undefined ? undefined : fromToPosition.toPositionFromReferent.id);
473
+ else {
474
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
475
+ LinearlyReferencedFromToLocation.insert(txnOrIModel, newId, fromToPosition.fromPosition, fromToPosition.toPosition, fromToPosition.fromPositionFromReferent === undefined ? undefined : fromToPosition.fromPositionFromReferent.id, fromToPosition.toPositionFromReferent === undefined ? undefined : fromToPosition.toPositionFromReferent.id);
476
+ }
432
477
  return newId;
433
478
  }
434
479
  static getLinearLocations(iModel, linearlyLocatedElementId, fullClassName) {
@@ -477,8 +522,7 @@ export class LinearlyLocated {
477
522
  }
478
523
  }
479
524
  static updateAtLocation(txnOrIModel, linearlyLocatedElementId, linearLocationProps, aspectId) {
480
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
481
- const iModel = txn.iModel;
525
+ const iModel = txnOrIModel instanceof EditTxn ? txnOrIModel.iModel : txnOrIModel;
482
526
  let linearLocAspectId;
483
527
  if (aspectId !== undefined)
484
528
  linearLocAspectId = aspectId;
@@ -495,11 +539,15 @@ export class LinearlyLocated {
495
539
  atPosition: linearLocationProps.atPosition,
496
540
  fromReferent: linearLocationProps.fromReferent,
497
541
  };
498
- txn.updateAspect(linearLocationAspectProps);
542
+ if (txnOrIModel instanceof EditTxn)
543
+ txnOrIModel.updateAspect(linearLocationAspectProps);
544
+ else {
545
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
546
+ txnOrIModel.elements.updateAspect(linearLocationAspectProps);
547
+ }
499
548
  }
500
549
  static updateFromToLocation(txnOrIModel, linearlyLocatedElementId, linearLocationProps, aspectId) {
501
- const txn = txnOrIModel instanceof EditTxn ? txnOrIModel : txnOrIModel[_implicitTxn];
502
- const iModel = txn.iModel;
550
+ const iModel = txnOrIModel instanceof EditTxn ? txnOrIModel.iModel : txnOrIModel;
503
551
  let linearLocAspectId;
504
552
  if (aspectId !== undefined)
505
553
  linearLocAspectId = aspectId;
@@ -518,7 +566,12 @@ export class LinearlyLocated {
518
566
  toPosition: linearLocationProps.toPosition,
519
567
  toPositionFromReferent: linearLocationProps.toPositionFromReferent,
520
568
  };
521
- txn.updateAspect(linearLocationAspectProps);
569
+ if (txnOrIModel instanceof EditTxn)
570
+ txnOrIModel.updateAspect(linearLocationAspectProps);
571
+ else {
572
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- deprecated IModelDb overload is intentionally preserved for backward compatibility.
573
+ txnOrIModel.elements.updateAspect(linearLocationAspectProps);
574
+ }
522
575
  }
523
576
  /** Query for the Id of the Linear-Element along which the specified LinearlyLocated Element is located.
524
577
  * @param iModel The iModel to query from.