ViewStore.ViewDb Class

Extends

Implements

Methods

Name Description
constructor(arg?: ViewStore.ViewDbCtorArgs): ViewStore.ViewDb    
addCategorySelector(args: { name?: string, owner?: string, selector: ViewStoreRpc.SelectorProps }): Promise<string> Add a category selector to a ViewStore.  
addDisplayStyle(args: { className: string, name?: string, owner?: string, settings: DisplayStyleSettingsProps }): Promise<string> Add a display style to a ViewStore.  
addModelSelector(args: { name?: string, owner?: string, selector: ViewStoreRpc.SelectorProps }): Promise<string> Add a model selector to a ViewStore.  
addOrReplaceThumbnail(args: { owner?: string, thumbnail: ThumbnailProps, viewId: RowIdOrString }): Promise<void> Add a thumbnail for a view.  
addTagsToView(args: { owner?: string, tags: string[], viewId: RowIdOrString }): Promise<void> Add tags to a view.  
addTimeline(args: { name?: string, owner?: string, timeline: RenderSchedule.ScriptProps }): Promise<string> Add a render timeline to a ViewStore.  
addView(args: ViewStoreRpc.AddViewArgs): Promise<string> Add a view to a ViewStore.  
addViewGroup(args: { name: string, owner?: string, parentId?: string }): Promise<string> Add a view group to a ViewStore.  
changeDefaultViewId(args: { defaultView: RowIdOrString, group?: string }): Promise<void> Change the default view for a view group.  
createDDL(): void Protected create all the tables for a new ViewDb  
deleteCategorySelector(args: { id: RowIdOrString }): Promise<void> Delete a category selector from a ViewStore.  
deleteCategorySelectorSync(id: RowIdOrString): void    
deleteDisplayStyle(args: { id: RowIdOrString }): Promise<void> Delete a display style from a ViewStore.  
deleteDisplayStyleSync(id: RowIdOrString): void    
deleteModelSelector(args: { id: RowIdOrString }): Promise<void> Delete a model selector from a ViewStore.  
deleteModelSelectorSync(id: RowIdOrString): void    
deleteSearch(id: number): void    
deleteTag(arg: { name: string }): Promise<void> Delete a tag.  
deleteTagSync(arg: { name: string }): void    
deleteThumbnail(arg: { viewId: string }): Promise<void> Delete the thumbnail for a view.  
deleteThumbnailSync(id: string): void    
deleteTimeline(args: { id: RowIdOrString }): Promise<void> Delete a render timeline from a ViewStore.  
deleteTimelineSync(id: RowIdOrString): void    
deleteView(arg: { viewId: RowIdOrString }): Promise<void> Delete a view from a ViewStore.  
deleteViewGroup(args: { name: string }): Promise<void> Delete a view group from a ViewStore.  
findViewGroup(groupName: string): number find a group with the specified name using path syntax (e.g., "group1/design/issues").  
findViewsByOwner(args: { owner: string }): Promise<ViewStoreRpc.ViewInfo[]> Find all views owned by the supplied owner name.  
getCategorySelector(args: ViewStoreRpc.NameOrId & ViewStoreRpc.QueryBindings): Promise<CategorySelectorProps> Get a category selector by Id.  
getDisplayStyle(args: ViewStoreRpc.NameOrId & { opts?: DisplayStyleLoadProps }): Promise<DisplayStyleProps> Get a display style by Id.  
getDisplayStyleSync(args: ViewStoreRpc.NameOrId & { opts?: DisplayStyleLoadProps }): DisplayStyleProps    
getModelSelector(args: ViewStoreRpc.NameOrId & ViewStoreRpc.QueryBindings): Promise<ModelSelectorProps> Get a model selector by Id.  
getModelSelectorSync(args: ViewStoreRpc.NameOrId & ViewStoreRpc.QueryBindings): ModelSelectorProps    
getTagsForView(viewId: RowIdOrString): undefined | string[] get the array of tags for the specified view.  
getThumbnail(args: { viewId: RowIdOrString }): Promise<undefined | ThumbnailProps> Get a thumbnail for a view.  
getThumbnailSync(args: { viewId: RowIdOrString }): undefined | ThumbnailProps    
getTimeline(args: ViewStoreRpc.NameOrId): Promise<RenderTimelineProps> Get a render timeline by Id.  
getTimelineSync(args: ViewStoreRpc.NameOrId): RenderTimelineProps    
getViewByName(arg: { groupId?: RowIdOrString, name: string }): Promise<undefined | ViewStoreRpc.ViewInfo> Get a view by name.  
getViewByNameSync(arg: { groupId?: RowIdOrString, name: string }): undefined | ViewStoreRpc.ViewInfo    
getViewDefinition(args: { viewId: RowIdOrString }): Promise<ViewDefinitionProps> Get a view definition by viewId.  
getViewDefinitionSync(args: { viewId: RowIdOrString }): ViewDefinitionProps    
getViewGroupInfo(args: { groupId?: string }): Promise<undefined | ViewStoreRpc.ViewGroupInfo> get the properties of a ViewGroup by id.  
getViewGroups(args: { parent?: string }): Promise<{ id: string, name: string }[]> Get a list of ViewGroups that are children of the supplied parent.  
getViewInfo(args: { viewId: RowIdOrString }): Promise<undefined | ViewStoreRpc.ViewInfo> Get the ViewInfo for a view by Id.  
queryViews(queryParams: ViewStoreRpc.QueryParams): Promise<ViewStoreRpc.ViewInfo[]> Query for a list of ViewInfos for views that match the supplied QueryParams.  
queryViewsSync(queryParams: ViewStoreRpc.QueryParams): ViewStoreRpc.ViewInfo[]    
removeTagFromView(args: { tag: string, viewId: RowIdOrString }): Promise<void> remove a tag from a view.  
renameCategorySelector(args: { id: RowIdOrString, name?: string }): Promise<void> Set the name of a category selector.  
renameDisplayStyle(args: { id: RowIdOrString, name?: string }): Promise<void> Set the name of a display style.  
renameModelSelector(args: { id: RowIdOrString, name?: string }): Promise<void> Set the name of a model selector.  
renameSearch(args: { id: RowIdOrString, name: string }): Promise<void>    
renameTag(args: { newName: string, oldName: string }): Promise<void> rename an existing tag.  
renameTimeline(args: { id: RowIdOrString, name?: string }): Promise<void> Set the name of a render timeline.  
renameView(args: { name: string, viewId: RowIdOrString }): Promise<void> Set the name of a view.  
renameViewGroup(args: { groupId: RowIdOrString, name: string }): Promise<void> Set the name of a view group.  
updateCategorySelector(args: ViewStoreRpc.NameOrId & { selector: ViewStoreRpc.SelectorProps }): Promise<void> Update the properties of a category selector.  
updateDisplayStyle(args: ViewStoreRpc.NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void> Update the properties of a display style.  
updateModelSelector(args: ViewStoreRpc.NameOrId & { selector: ViewStoreRpc.SelectorProps }): Promise<void> Update the properties of a model selector.  
updateTimeline(args: ViewStoreRpc.NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void> Update the properties of a render timeline.  
updateViewDefinition(args: { viewDefinition: ViewDefinitionProps, viewId: RowIdOrString }): Promise<void> Update the properties of a view definition.  
updateViewShared(arg: { isShared: boolean, owner?: string, viewId: RowIdOrString }): Promise<void> Change a view from shared to private, or vice versa.  

Inherited methods

Name Inherited from Description
abandonChanges(): void Inherited VersionedSqliteDb Abandon (cancel) the outermost transaction, discarding all changes since last save.
closeDb(saveChanges?: boolean): void Inherited VersionedSqliteDb Close SQLiteDb.
createDb(dbName: string): void Inherited VersionedSqliteDb Create a SQLiteDb
createDb(dbName: string, container?: CloudSqlite.CloudContainer, params?: SQLiteDb.CreateParams): void Inherited VersionedSqliteDb  
createTable(args: { addTimestamp?: boolean, columns: string, constraints?: string, tableName: string }): void Protected Inherited VersionedSqliteDb Create a new table in this database.
dispose(): void Inherited VersionedSqliteDb alias for closeDb.
executeSQL(sql: string): DbResult Inherited VersionedSqliteDb execute an SQL statement
getRequiredVersions(): SQLiteDb.RequiredVersionRanges Inherited VersionedSqliteDb Get the required version ranges necessary to open this VersionedSqliteDb.
openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: CloudSqlite.CloudContainer): void Inherited VersionedSqliteDb Open this database and verify that this version of the software meets the required version range (as appropriate, read or write) stored in the database.
readLastModTime(tableName: string, rowId: number): Date Inherited VersionedSqliteDb Get the last modified date for a row in a table of this database.
saveChanges(): void Inherited VersionedSqliteDb Commit the outermost transaction, writing changes to the file.
setRequiredVersions(versions: SQLiteDb.RequiredVersionRanges): void Inherited VersionedSqliteDb Change the "versions required to open this database" property stored in this database.
upgradeSchema(arg: { dbName: string, lockContainer?: { container: CloudSqlite.CloudContainer, user: string }, upgradeFn: () => void }): Promise<void | () => void> Inherited VersionedSqliteDb  
vacuum(args?: SQLiteDb.VacuumDbArgs): void Inherited VersionedSqliteDb vacuum this database
verifyVersions(): void Protected Inherited VersionedSqliteDb Verify that this version of the software meets the required version range (as appropriate, read or write) stored in the database.
withOpenDb<T>(args: SQLiteDb.WithOpenDbArgs, operation: () => T): T Inherited VersionedSqliteDb Open a database, perform an operation, then close the database.
withPreparedSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T Inherited VersionedSqliteDb Use a prepared SQL statement, potentially from the statement cache.
withSavePoint(savePointName: string, operation: () => void): void Inherited VersionedSqliteDb Perform an operation on this database within a savepoint.
withSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T Inherited VersionedSqliteDb Prepare and execute a callback on a SQL statement.
createNewDb(fileName: string, setupArgs?: any): void Static Inherited VersionedSqliteDb Create a new database file for the subclass of VersionedSqliteDb.

Properties

Name Type Description
guidMap Accessor IModelDb.GuidMapper    
iModel Accessor IModelDb    
myVersion string The current semver "persistence version" of this class.  

Inherited properties

Name Type Inherited from Description
_versionProps Protected Static Inherited { name: "versions", namespace: "SQLiteDb" } VersionedSqliteDb  
isOpen Accessor Inherited ReadOnly boolean VersionedSqliteDb Returns true if this SQLiteDb is open
isReadonly Accessor Inherited ReadOnly boolean VersionedSqliteDb Returns true if this SQLiteDb is open readonly

Defined in

Last Updated: 14 November, 2024