@itwin/core-backend 5.1.0-dev.64 → 5.1.0-dev.66
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/BisCoreSchema.d.ts.map +1 -1
- package/lib/cjs/BisCoreSchema.js +3 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/Entity.d.ts +2 -0
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +14 -0
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +6 -2
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +12 -5
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +18 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +57 -2
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js +1 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.js +15 -1
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.d.ts +2 -2
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js +14 -2
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/core-backend.d.ts +1 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +1 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +22 -0
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/fields.js +237 -0
- package/lib/cjs/internal/annotations/fields.js.map +1 -0
- package/lib/esm/BisCoreSchema.d.ts.map +1 -1
- package/lib/esm/BisCoreSchema.js +3 -1
- package/lib/esm/BisCoreSchema.js.map +1 -1
- package/lib/esm/Entity.d.ts +2 -0
- package/lib/esm/Entity.d.ts.map +1 -1
- package/lib/esm/Entity.js +14 -0
- package/lib/esm/Entity.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +6 -2
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +13 -6
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
- package/lib/esm/annotations/TextAnnotationElement.d.ts +18 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +57 -2
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js +1 -0
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.js +15 -1
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.d.ts +2 -2
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js +14 -2
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/core-backend.d.ts +1 -0
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +1 -0
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +22 -0
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
- package/lib/esm/internal/annotations/fields.js +231 -0
- package/lib/esm/internal/annotations/fields.js.map +1 -0
- package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
- package/lib/esm/test/IModelTestUtils.js +1 -0
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
- package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
- package/lib/esm/test/annotations/Fields.test.js +576 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -0
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/package.json +14 -14
package/lib/esm/IModelDb.js
CHANGED
|
@@ -45,7 +45,7 @@ import { IModelNative } from "./internal/NativePlatform";
|
|
|
45
45
|
import { createNoOpLockControl } from "./internal/NoLocks";
|
|
46
46
|
import { createIModelDbFonts } from "./internal/IModelDbFontsImpl";
|
|
47
47
|
import { _cache, _close, _hubAccess, _instanceKeyCache, _nativeDb, _releaseAllLocks } from "./internal/Symbols";
|
|
48
|
-
import { SchemaContext, SchemaJsonLocater } from "@itwin/ecschema-metadata";
|
|
48
|
+
import { ECVersion, SchemaContext, SchemaJsonLocater } from "@itwin/ecschema-metadata";
|
|
49
49
|
import { SchemaMap } from "./Schema";
|
|
50
50
|
import { ElementLRUCache, InstanceKeyLRUCache } from "./internal/ElementLRUCache";
|
|
51
51
|
// spell:ignore fontid fontmap
|
|
@@ -1155,19 +1155,26 @@ export class IModelDb extends IModel {
|
|
|
1155
1155
|
const classNameParts = classFullName.replace(".", ":").split(":");
|
|
1156
1156
|
return classNameParts.length === 2 && this[_nativeDb].getECClassMetaData(classNameParts[0], classNameParts[1]).error === undefined;
|
|
1157
1157
|
}
|
|
1158
|
-
/** Query
|
|
1158
|
+
/** Query the version of a schema of the specified name in this iModel.
|
|
1159
1159
|
* @returns The schema version as a semver-compatible string or `undefined` if the schema has not been imported.
|
|
1160
1160
|
*/
|
|
1161
1161
|
querySchemaVersion(schemaName) {
|
|
1162
|
+
const version = this.querySchemaVersionNumbers(schemaName);
|
|
1163
|
+
return version?.toString(false);
|
|
1164
|
+
}
|
|
1165
|
+
/** Query the version of a schema of the specified name in this iModel.
|
|
1166
|
+
* @returns the version numbers, or `undefined` if the schema has not been imported.
|
|
1167
|
+
*/
|
|
1168
|
+
querySchemaVersionNumbers(schemaName) {
|
|
1162
1169
|
const sql = `SELECT VersionMajor,VersionWrite,VersionMinor FROM ECDbMeta.ECSchemaDef WHERE Name=:schemaName LIMIT 1`;
|
|
1163
1170
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1164
1171
|
return this.withPreparedStatement(sql, (statement) => {
|
|
1165
1172
|
statement.bindString("schemaName", schemaName);
|
|
1166
1173
|
if (DbResult.BE_SQLITE_ROW === statement.step()) {
|
|
1167
|
-
const
|
|
1168
|
-
const
|
|
1169
|
-
const
|
|
1170
|
-
return
|
|
1174
|
+
const read = statement.getValue(0).getInteger(); // ECSchemaDef.VersionMajor --> semver.major
|
|
1175
|
+
const write = statement.getValue(1).getInteger(); // ECSchemaDef.VersionWrite --> semver.minor
|
|
1176
|
+
const minor = statement.getValue(2).getInteger(); // ECSchemaDef.VersionMinor --> semver.patch
|
|
1177
|
+
return new ECVersion(read, write, minor);
|
|
1171
1178
|
}
|
|
1172
1179
|
return undefined;
|
|
1173
1180
|
});
|