CatalogDb Namespace
Function
Name | Description |
---|---|
CatalogDb.acquireWriteLock | Acquire the write lock for a CatalogIModel container. |
CatalogDb.createNewContainer | Create a new BlobContainer to hold versions of a CatalogDb. |
CatalogDb.createNewVersion | Create a new version of a CatalogIModel as a copy of an existing version. |
CatalogDb.openEditable | Open an EditableCatalogDb for write access. |
CatalogDb.openReadonly | Open a CatalogDb for read-only access. |
CatalogDb.releaseWriteLock | Release the write lock on a CatalogIModel container. |
Defined in
- core/backend/src/CatalogDb.ts Line 85
CatalogDb Interface
A StandaloneDb that provides read-only access to the contents of a CatalogIModel.
@see openReadonly to instantiate this type.
Extends
Methods
Name | Description | |
---|---|---|
getInfo(): { manifest?: CatalogIModel.Manifest, version: string } | Get the catalog's manifest and version. | |
getManifest(): undefined | CatalogIModel.Manifest | Get the catalog's manifest. | |
getVersion(): string | Get the catalog's version information. | |
isEditable(): this is EditableCatalogDb | Returns true if the catalog was opened in read-write mode. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
abandonChanges(): void Inherited | StandaloneDb | Abandon changes in memory that have not been saved as a Txn to this iModelDb. |
acquireSchemaLock(): Promise<void> Inherited | StandaloneDb | Acquire the exclusive schema lock on this iModel. |
attachDb(fileName: string, alias: string): void Inherited | StandaloneDb | Attach an iModel file to this connection and load and register its schemas. |
clearCaches(): void Inherited | StandaloneDb | Clear all in-memory caches held in this IModelDb. |
close(): void Inherited | StandaloneDb | Close this IModel, if it is currently open, and save changes if it was opened in ReadWrite mode. |
computeProjectExtents(options?: ComputeProjectExtentsOptions): ComputedProjectExtents Inherited | StandaloneDb | Compute an appropriate project extents for this iModel based on the ranges of all spatial elements. |
constructEntity<T extends Entity, P extends EntityProps>(props: P): T Inherited | StandaloneDb | Construct an entity (Element or Model) from an iModel. |
containsClass(classFullName: string): boolean Inherited | StandaloneDb | Query if this iModel contains the definition of the specified class. |
createClassViews(): void Inherited | StandaloneDb | Creates or updates views in the iModel to permit visualizing the EC content as ECClasses and ECProperties rather than raw database tables and columns. |
createQueryReader(ecsql: string, params?: QueryBinder, config?: QueryOptions): ECSqlReader Inherited | StandaloneDb | Allow to execute query and read results along with meta data. |
deleteFileProperty(prop: FilePropertyProps): void Inherited | StandaloneDb | delete a "file property" from this iModel |
deleteSettingDictionary(name: string): void Inherited | StandaloneDb | Delete a SettingDictionary, previously added with saveSettingDictionary, from this iModel. |
detachDb(alias: string): void Inherited | StandaloneDb | Detach the attached file from this connection. |
elementGeometryCacheOperation(requestProps: ElementGeometryCacheOperationRequestProps): BentleyStatus Inherited | StandaloneDb | Request operation using the backend geometry cache populated by first calling elementGeometryRequest. |
elementGeometryRequest(requestProps: ElementGeometryRequest): IModelStatus Inherited | StandaloneDb | Request geometry stream information from an element in binary format instead of json. |
exportGraphics(exportProps: ExportGraphicsOptions): DbResult Inherited | StandaloneDb | Export meshes suitable for graphics APIs from arbitrary geometry in elements in this IModelDb. |
exportPartGraphics(exportProps: ExportPartGraphicsOptions): DbResult Inherited | StandaloneDb | Exports meshes suitable for graphics APIs from a specified GeometryPart |
exportSchema(args: ExportSchemaArgs): void Inherited | StandaloneDb | Writes the contents of a single ECSchema to a file on the local file system. |
exportSchemas(outputDirectory: string): void Inherited | StandaloneDb | Writes the contents of all ECSchemas in this iModel to files in a directory on the local file system. |
forEachMetaData(classFullName: string, wantSuper: boolean, func: PropertyCallback, includeCustom: booleantrue): void Inherited | StandaloneDb | Invoke a callback on each property of the specified class, optionally including superclass properties. |
generateElementGraphics(request: ElementGraphicsRequestProps): Promise<undefined | Uint8Array> Inherited | StandaloneDb | Generate graphics for an element or geometry stream. |
getBriefcaseId(): number Inherited | StandaloneDb | Get the briefcase Id of this iModel |
getGeoCoordinatesFromIModelCoordinates(props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> Inherited | StandaloneDb | Get the GeoCoordinate (longitude, latitude, elevation) corresponding to each IModel Coordinate point in the input |
getGeometryContainment(props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> Inherited | StandaloneDb | Get the clip containment status for the supplied elements. |
getIModelCoordinatesFromGeoCoordinates(props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> Inherited | StandaloneDb | Get the IModel coordinate corresponding to each GeoCoordinate point in the input |
getJsClass<T extends >(classFullName: string): T Inherited | StandaloneDb | Get the JavaScript class that handles a given entity class. |
getLastError(): string Inherited | StandaloneDb | Returns a string representation of the error that most recently arose during an operation on the underlying SQLite database. |
getMassProperties(props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> Inherited | StandaloneDb | Get the mass properties for the supplied elements. |
getMetaData(classFullName: string): EntityMetaData Inherited | StandaloneDb | Get metadata for a class. |
getSchemaProps(name: string): ECSchemaProps Inherited | StandaloneDb | Returns the full schema for the input name. |
importSchemas(schemaFileNames: string[], options?: SchemaImportOptions): Promise<void> Inherited | StandaloneDb | Import an ECSchema. |
inlineGeometryParts(): InlineGeometryPartsResult Inherited | StandaloneDb | Attempts to optimize all of the geometry in this iModel by identifying GeometryParts that are referenced by exactly one |
isBriefcaseDb(): this is BriefcaseDb Inherited | StandaloneDb | Type guard for instanceof BriefcaseDb |
isSnapshotDb(): this is SnapshotDb Inherited | StandaloneDb | Type guard for instanceof SnapshotDb |
isStandaloneDb(): this is StandaloneDb Inherited | StandaloneDb | Type guard for instanceof StandaloneDb. |
makeLockControl(): void Protected Inherited | StandaloneDb | |
performCheckpoint(): void Inherited | StandaloneDb | Save all changes and perform a checkpoint on this IModelDb. |
prepareStatement(sql: string, logErrors: booleantrue): ECSqlStatement Inherited | StandaloneDb | Prepare an ECSQL statement. |
pullChanges(arg?: PullChangesArgs): Promise<void> Inherited | StandaloneDb | Pull and apply changesets from iModelHub |
pushChanges(arg: PushChangesArgs): Promise<void> Inherited | StandaloneDb | Push changes to iModelHub. |
queryEntityIds(params: EntityQueryParams): Id64Set Inherited | StandaloneDb | Query for a set of entity ids, given an EntityQueryParams |
queryFilePropertyBlob(prop: FilePropertyProps): undefined | Uint8Array Inherited | StandaloneDb | Query a "file property" from this iModel, as a blob. |
queryFilePropertyString(prop: FilePropertyProps): undefined | string Inherited | StandaloneDb | Query a "file property" from this iModel, as a string. |
queryNextAvailableFileProperty(prop: FilePropertyProps): number Inherited | StandaloneDb | Query for the next available major id for a "file property" from this iModel. |
querySchemaVersion(schemaName: string): undefined | string Inherited | StandaloneDb | Query for a schema of the specified name in this iModel. |
revertAndPushChanges(arg: RevertChangesArgs): Promise<void> Inherited | StandaloneDb | Revert timeline changes and then push resulting changeset |
saveChanges(description?: string): void Inherited | StandaloneDb | Commit unsaved changes in memory as a Txn to this iModelDb. |
saveFileProperty(prop: FilePropertyProps, strValue: string, blobVal?: Uint8Array): void Inherited | StandaloneDb | Save a "file property" to this iModel |
saveSettingDictionary(name: string, dict: SettingsContainer): void Inherited | StandaloneDb | Save a SettingDictionary in this iModel that will be loaded into settings every time this iModel is opened in future sessions. |
simplifyElementGeometry(args: SimplifyElementGeometryArgs): IModelStatus Inherited | StandaloneDb | Attempt to simplify the geometry stream of a single GeometricElement or GeometryPart as specified by args . |
tryGetMetaData(classFullName: string): undefined | EntityMetaData Inherited | StandaloneDb | Identical to getMetaData, except it returns undefined instead of throwing an error if the metadata cannot be found nor loaded. |
tryPrepareStatement(sql: string): undefined | ECSqlStatement Inherited | StandaloneDb | Prepare an ECSQL statement. |
updateEcefLocation(ecef: EcefLocation): void Inherited | StandaloneDb | Update the EcefLocation of this iModel. |
updateElementGeometryCache(requestProps: ElementGeometryCacheRequestProps): Promise<ElementGeometryCacheResponseProps> Inherited | StandaloneDb | Request the creation of a backend geometry cache for the specified geometric element. |
updateIModelProps(): void Inherited | StandaloneDb | Update the IModelProps of this iModel in the database. |
updateProjectExtents(newExtents: Range3d): void Inherited | StandaloneDb | Update the project extents for this iModel. |
withPreparedSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T, logErrors: booleantrue): T Inherited | StandaloneDb | Use a prepared SQL statement, potentially from the statement cache. |
withPreparedStatement<T>(ecsql: string, callback: (stmt: ECSqlStatement) => T, logErrors: booleantrue): T Inherited | StandaloneDb | Use a prepared ECSQL statement, potentially from the statement cache. |
withSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T, logErrors: booleantrue): T Inherited | StandaloneDb | Prepared and execute a callback on a SQL statement. |
withStatement<T>(ecsql: string, callback: (stmt: ECSqlStatement) => T, logErrors: booleantrue): T Inherited | StandaloneDb | Prepared and execute a callback on an ECSQL statement. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_fontMap Protected Inherited | FontMap | undefined | StandaloneDb | |
briefcaseId Readonly Inherited | number | StandaloneDb | |
channels Readonly Inherited | ChannelControl | StandaloneDb | |
elements Readonly Inherited | IModelDb.Elements | StandaloneDb | |
models Readonly Inherited | IModelDb.Models | StandaloneDb | |
onBeforeClose Readonly Inherited | BeEvent<() => void> | StandaloneDb | Event called when the iModel is about to be closed. |
onChangesetApplied Readonly Inherited | BeEvent<() => void> | StandaloneDb | Event called after a changeset is applied to this IModelDb. |
onClosed Readonly Inherited | BeEvent<() => void> | StandaloneDb | Event raised after a BriefcaseDb has been closed. |
tiles Readonly Inherited | IModelDb.Tiles | StandaloneDb | |
txns Readonly Inherited | TxnManager | StandaloneDb | Manages local changes to this briefcase. |
views Readonly Inherited | IModelDb.Views | StandaloneDb | |
cloudContainer Accessor Inherited ReadOnly | undefined | CloudSqlite.CloudContainer | StandaloneDb | get the cloud container for this iModel, if it was opened from one |
codeSpecs Accessor Inherited ReadOnly | CodeSpecs | StandaloneDb | Get the CodeSpecs in this IModel. |
codeValueBehavior Accessor Inherited | "exact" | "trim-unicode-whitespace" | StandaloneDb | Controls how Codes are copied from this iModel into another iModel, to work around problems with iModels created by older connectors. The imodel-transformer sets this appropriately on your behalf - you should never need to set or interrogate this property yourself. |
fontMap Accessor Inherited ReadOnly | FontMap | StandaloneDb | |
fonts Accessor Inherited ReadOnly | IModelDbFonts | StandaloneDb | Provides methods for interacting with font-related information stored in this iModel. |
holdsSchemaLock Accessor Inherited ReadOnly | boolean | StandaloneDb | determine whether the schema lock is currently held for this iModel. |
iModelId Accessor Inherited ReadOnly | string | StandaloneDb | The Guid that identifies this iModel. |
isBriefcase Accessor Inherited ReadOnly | boolean | StandaloneDb | override superclass method |
isReadonly Accessor Inherited ReadOnly | boolean | StandaloneDb | Check if this iModel has been opened read-only or not. |
isSnapshot Accessor Inherited ReadOnly | boolean | StandaloneDb | Returns true if this is a SnapshotDb |
iTwinId Accessor Inherited ReadOnly | string | StandaloneDb | The Guid that identifies the context that owns this iModel. GuidString | undefined for the superclass, but required for BriefcaseDb |
jsClassMap Accessor Inherited ReadOnly | EntityJsClassMap | StandaloneDb | Allows registering js classes mapped to ECClasses |
locks Accessor Inherited ReadOnly | LockControl | StandaloneDb | The LockControl that orchestrates concurrent editing of this iModel. |
pathName Accessor Inherited ReadOnly | string | StandaloneDb | Get the full path fileName of this iModelDb |
relationships Accessor Inherited ReadOnly | Relationships | StandaloneDb | Get the linkTableRelationships for this IModel |
schemaContext Accessor Inherited ReadOnly | SchemaContext | StandaloneDb | Gets the context that allows accessing the metadata (ecschema-metadata package) of this iModel |
schemaMap Accessor Inherited ReadOnly | SchemaMap | StandaloneDb | Allows locally registering a schema for this imodel, in constrast to [Schemas.registerSchema] which is a global operation |
useLockServer Accessor Protected Inherited ReadOnly | boolean | StandaloneDb | Determine whether this BriefcaseDb should use a lock server. All must be true: - file is open for write - has an assigned briefcaseId - the "no locking" flag is not present. This is a property of an iModel, established when the iModel is created in IModelHub. |
workspace Accessor Inherited ReadOnly | Workspace | StandaloneDb | Get the Workspace for this iModel. |
Defined in
- core/backend/src/CatalogDb.ts Line 85
Last Updated: 26 April, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.