@itwin/core-backend
Version:
iTwin.js backend components
30 lines • 1.26 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Workspace
*/
/**
* The fixed db name used by [[WorkspaceDb]]'s meant to hold settings.
* [[Workspace.loadSettingsDictionary]] will treat rows in the 'strings' table as setting dictionary entries when [[WorkspaceDbSettingsProps.dbName]] matches this value.
* @see [[Workspace.loadSettingsDictionary]]
* @internal
*/
export const settingsWorkspaceDbName = "settings-db";
/** Return true if a [[WorkspaceDb]] is a [[SettingsDb]].
* @internal
*/
export function isSettingsDb(db) {
return db.dbName === settingsWorkspaceDbName;
}
/** Query all string resource names from a [[SettingsDb]].
* @internal
*/
export function queryStringResourceNames(db) {
const resourceNames = [];
db.queryResources({ type: "string", callback: (names) => { for (const n of names)
resourceNames.push(n); } });
return resourceNames;
}
//# sourceMappingURL=SettingsDb.js.map