@itwin/core-backend 3.4.0-dev.20 → 3.4.0-dev.21

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.
@@ -0,0 +1,134 @@
1
+ import { CloudSqlite } from "@bentley/imodeljs-native";
2
+ import { AccessToken } from "@itwin/core-bentley";
3
+ import { SQLiteDb } from "./SQLiteDb";
4
+ import { SettingObject } from "./workspace/Settings";
5
+ /**
6
+ * A persistent storage for a set of values of type `PropertyType`, each with a unique `PropertyName`.
7
+ * `PropertyStore`s are stored in cloud containers, and require an access token that grants permission to read and/or write them.
8
+ * All write operations will fail without an access token that grants write permission.
9
+ * A `PropertyStore` is cached on a local drive so reads are fast and inexpensive, and may even be done offline after a prefetch.
10
+ * However, that means that callers are responsible for synchronizing the local cache to ensure it includes changes
11
+ * made by others, as appropriate (see [[synchronizeWithCloud]]).
12
+ * @alpha */
13
+ export interface PropertyStore {
14
+ /** The collection of property values in the PropertyStore as of the last time it was synchronized. */
15
+ readonly values: PropertyStore.Values;
16
+ /** Application-supplied parameters for obtaining the write lock on the container for a PropertyStore.*/
17
+ readonly appParams: SQLiteDb.ObtainLockParams;
18
+ /**
19
+ * The token that grants access to the cloud container for this PropertyStore. If it does not grant write permissions, all
20
+ * write operations will fail. It should be refreshed (via a timer) before it expires.
21
+ */
22
+ sasToken: AccessToken;
23
+ /**
24
+ * Synchronize the local values in this PropertyStore with any changes by made by others.
25
+ * @note This is called automatically whenever any write operation is performed on the PropertyStore. It is only necessary to
26
+ * call this directly if you have not changed the PropertyStore recently, but wish to perform a readonly operation and want to
27
+ * ensure it is up-to-date as of now.
28
+ * @note There is no guarantee that the Values are up-to-date even immediately after calling this method, since others
29
+ * may be modifying them at any time.
30
+ */
31
+ synchronizeWithCloud(): void;
32
+ /** initiate a prefetch operation on this PropertyStore
33
+ * @internal
34
+ */
35
+ startPrefetch(): SQLiteDb.CloudPrefetch;
36
+ /** Save a single property in this PropertyStore. If the property already exists, its value is overwritten.
37
+ * @note This will obtain the write lock, save the value, and then release the write lock.
38
+ */
39
+ saveProperty(name: PropertyStore.PropertyName, value: PropertyStore.PropertyType): Promise<void>;
40
+ /** Save an array of properties in this PropertyStore. If a property already exists, its value is overwritten.
41
+ * @note This will obtain the write lock, save the values, and then release the write lock.
42
+ */
43
+ saveProperties(props: PropertyStore.PropertyArray): Promise<void>;
44
+ /** Delete a single property from this PropertyStore. If the value does not exist, this method does nothing.
45
+ * @note This will obtain the write lock, delete the value, and then release the write lock.
46
+ */
47
+ deleteProperty(propName: PropertyStore.PropertyName): Promise<void>;
48
+ /** Delete an array of properties from this PropertyStore. Any value that does not exist is ignored.
49
+ * @note This will obtain the write lock, delete the values, and then release the write lock.
50
+ */
51
+ deleteProperties(propNames: PropertyStore.PropertyName[]): Promise<void>;
52
+ }
53
+ /** @alpha */
54
+ export declare namespace PropertyStore {
55
+ /** @internal */
56
+ let openPropertyStore: ((props: CloudSqlite.ContainerAccessProps) => PropertyStore) | undefined;
57
+ /** The set of valid types for properties in a PropertyStore. */
58
+ type PropertyType = string | number | boolean | Uint8Array | SettingObject;
59
+ /** The name of a Property. May not have leading or trailing spaces, and must be between 3 and 2048 characters long. */
60
+ type PropertyName = string;
61
+ /** An array of PropertyName/PropertyType pairs to be stored in a PropertyStore. */
62
+ type PropertyArray = {
63
+ name: PropertyName;
64
+ value: PropertyType;
65
+ }[];
66
+ /** The return status of an iteration function. The value "stop" causes the iteration to terminate. */
67
+ type IterationReturn = void | "stop";
68
+ /** An iteration function over Properties in a PropertyStore. It is called with the name of a each Property. */
69
+ type PropertyIteration = (name: string) => IterationReturn;
70
+ /** A filter used to limit and/or sort the values returned by an iteration. */
71
+ interface PropertyFilter {
72
+ /** A value filter. May include wild cards when used with `GLOB` or `LIKE` */
73
+ readonly value?: string;
74
+ /** The comparison operator for `value`. Default is `=` */
75
+ readonly valueCompare?: "GLOB" | "LIKE" | "NOT GLOB" | "NOT LIKE" | "=" | "<" | ">";
76
+ /** Order results ascending or descending. If not supplied, the results are unordered (random). */
77
+ readonly orderBy?: "ASC" | "DESC";
78
+ /** An SQL expression to further filter results. This string is appended to the `WHERE` clause with an `AND` (that should not be part of the sqlExpression) */
79
+ readonly sqlExpression?: string;
80
+ }
81
+ /**
82
+ * A readonly set of Property values in a PropertyStore.
83
+ * @alpha
84
+ */
85
+ interface Values {
86
+ /** get the value of a Property by name.
87
+ * @returns the property's value if it exists, `undefined` otherwise.
88
+ */
89
+ getProperty(name: PropertyName): PropertyType | undefined;
90
+ /** Get the value of a string property by name.
91
+ * @returns the property's value if it exists and is a string, `undefined` otherwise.
92
+ */
93
+ getString(name: PropertyName): string | undefined;
94
+ /** Get the value of a string property by name.
95
+ * @returns the property's value if it exists and is a string, otherwise the supplied default value.
96
+ */
97
+ getString(name: PropertyName, defaultValue: string): string;
98
+ /** Get the value of a boolean property by name.
99
+ * @returns the property's value if it exists and is a boolean, `undefined` otherwise.
100
+ */
101
+ getBoolean(name: PropertyName): boolean | undefined;
102
+ /** Get the value of a boolean property by name.
103
+ * @returns the property's value if it exists and is a boolean, otherwise the supplied default value.
104
+ */
105
+ getBoolean(name: PropertyName, defaultValue: boolean): boolean;
106
+ /** Get the value of a number property by name.
107
+ * @returns the property's value if it exists and is a number, `undefined` otherwise.
108
+ */
109
+ getNumber(name: PropertyName): number | undefined;
110
+ /** Get the value of a number property by name.
111
+ * @returns the property's value if it exists and is a number, otherwise the supplied default value.
112
+ */
113
+ getNumber(name: PropertyName, defaultValue: number): number;
114
+ /** Get the value of a blob property by name.
115
+ * @returns the property's value if it exists and is a blob, `undefined` otherwise.
116
+ */
117
+ getBlob(name: PropertyName): Uint8Array | undefined;
118
+ /** Get the value of a blob property by name.
119
+ * @returns the property's value if it exists and is a blob, otherwise the supplied default value.
120
+ */
121
+ getBlob(name: PropertyName, defaultValue: Uint8Array): Uint8Array;
122
+ /** Get the value of an object property by name.
123
+ * @returns the property's value if it exists and is an object, `undefined` otherwise.
124
+ */
125
+ getObject<T extends SettingObject>(name: PropertyName): T | undefined;
126
+ /** Get the value of an object property by name.
127
+ * @returns the property's value if it exists and is an object, otherwise the supplied default value.
128
+ */
129
+ getObject<T extends SettingObject>(name: PropertyName, defaultValue: T): T;
130
+ /** call an iteration function for each property, optionally applying a filter */
131
+ forAllProperties(iter: PropertyIteration, filter?: PropertyFilter): void;
132
+ }
133
+ }
134
+ //# sourceMappingURL=PropertyStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyStore.d.ts","sourceRoot":"","sources":["../../src/PropertyStore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;;;;YAOY;AACZ,MAAM,WAAW,aAAa;IAE5B,sGAAsG;IACtG,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC;IAEtC,wGAAwG;IACxG,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,gBAAgB,CAAC;IAE9C;;;OAGG;IACH,QAAQ,EAAE,WAAW,CAAC;IAEtB;;;;;;;OAOG;IACH,oBAAoB,IAAI,IAAI,CAAC;IAE7B;;OAEG;IACH,aAAa,IAAI,QAAQ,CAAC,aAAa,CAAC;IAExC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC,YAAY,EAAE,KAAK,EAAE,aAAa,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjG;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE;;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M,GAAG,SAAS,CAAC;QAClD;;UAEE;QACF,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;QAC5D;;UAEE;QACF,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;QACpD;;UAEE;QACF,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC;QAC/D;;UAEE;QACF,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;QAClD;;UAEE;QACF,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;QAC5D;;UAEE;QACF,OAAO,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;QACpD;;UAEE;QACF,OAAO,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,GAAG,UAAU,CAAC;QAClE;;UAEE;QACF,SAAS,CAAC,CAAC,SAAS,aAAa,EAAE,IAAI,EAAE,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC;QACtE;;UAEE;QACF,SAAS,CAAC,CAAC,SAAS,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC;QAC3E,iFAAiF;QACjF,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;KAC1E;CACF"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PropertyStore = void 0;
8
+ /** @alpha */
9
+ var PropertyStore;
10
+ (function (PropertyStore) {
11
+ })(PropertyStore = exports.PropertyStore || (exports.PropertyStore = {}));
12
+ //# sourceMappingURL=PropertyStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertyStore.js","sourceRoot":"","sources":["../../src/PropertyStore.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AA8D/F,aAAa;AACb,IAAiB,aAAa,CA+E7B;AA/ED,WAAiB,aAAa;AA+E9B,CAAC,EA/EgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA+E7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { CloudSqlite } from \"@bentley/imodeljs-native\";\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\nimport { SQLiteDb } from \"./SQLiteDb\";\r\nimport { SettingObject } from \"./workspace/Settings\";\r\n\r\n/**\r\n * A persistent storage for a set of values of type `PropertyType`, each with a unique `PropertyName`.\r\n * `PropertyStore`s are stored in cloud containers, and require an access token that grants permission to read and/or write them.\r\n * All write operations will fail without an access token that grants write permission.\r\n * A `PropertyStore` is cached on a local drive so reads are fast and inexpensive, and may even be done offline after a prefetch.\r\n * However, that means that callers are responsible for synchronizing the local cache to ensure it includes changes\r\n * made by others, as appropriate (see [[synchronizeWithCloud]]).\r\n * @alpha */\r\nexport interface PropertyStore {\r\n\r\n /** The collection of property values in the PropertyStore as of the last time it was synchronized. */\r\n readonly values: PropertyStore.Values;\r\n\r\n /** Application-supplied parameters for obtaining the write lock on the container for a PropertyStore.*/\r\n readonly appParams: SQLiteDb.ObtainLockParams;\r\n\r\n /**\r\n * The token that grants access to the cloud container for this PropertyStore. If it does not grant write permissions, all\r\n * write operations will fail. It should be refreshed (via a timer) before it expires.\r\n */\r\n sasToken: AccessToken;\r\n\r\n /**\r\n * Synchronize the local values in this PropertyStore with any changes by made by others.\r\n * @note This is called automatically whenever any write operation is performed on the PropertyStore. It is only necessary to\r\n * call this directly if you have not changed the PropertyStore recently, but wish to perform a readonly operation and want to\r\n * ensure it is up-to-date as of now.\r\n * @note There is no guarantee that the Values are up-to-date even immediately after calling this method, since others\r\n * may be modifying them at any time.\r\n */\r\n synchronizeWithCloud(): void;\r\n\r\n /** initiate a prefetch operation on this PropertyStore\r\n * @internal\r\n */\r\n startPrefetch(): SQLiteDb.CloudPrefetch;\r\n\r\n /** Save a single property in this PropertyStore. If the property already exists, its value is overwritten.\r\n * @note This will obtain the write lock, save the value, and then release the write lock.\r\n */\r\n saveProperty(name: PropertyStore.PropertyName, value: PropertyStore.PropertyType): Promise<void>;\r\n /** Save an array of properties in this PropertyStore. If a property already exists, its value is overwritten.\r\n * @note This will obtain the write lock, save the values, and then release the write lock.\r\n */\r\n saveProperties(props: PropertyStore.PropertyArray): Promise<void>;\r\n /** Delete a single property from this PropertyStore. If the value does not exist, this method does nothing.\r\n * @note This will obtain the write lock, delete the value, and then release the write lock.\r\n */\r\n deleteProperty(propName: PropertyStore.PropertyName): Promise<void>;\r\n /** Delete an array of properties from this PropertyStore. Any value that does not exist is ignored.\r\n * @note This will obtain the write lock, delete the values, and then release the write lock.\r\n */\r\n deleteProperties(propNames: PropertyStore.PropertyName[]): Promise<void>;\r\n}\r\n\r\n/** @alpha */\r\nexport namespace PropertyStore {\r\n /** @internal */\r\n export let openPropertyStore: ((props: CloudSqlite.ContainerAccessProps) => PropertyStore) | undefined;\r\n\r\n /** The set of valid types for properties in a PropertyStore. */\r\n export type PropertyType = string | number | boolean | Uint8Array | SettingObject;\r\n /** The name of a Property. May not have leading or trailing spaces, and must be between 3 and 2048 characters long. */\r\n export type PropertyName = string;\r\n /** An array of PropertyName/PropertyType pairs to be stored in a PropertyStore. */\r\n export type PropertyArray = { name: PropertyName, value: PropertyType }[];\r\n /** The return status of an iteration function. The value \"stop\" causes the iteration to terminate. */\r\n export type IterationReturn = void | \"stop\";\r\n /** An iteration function over Properties in a PropertyStore. It is called with the name of a each Property. */\r\n export type PropertyIteration = (name: string) => IterationReturn;\r\n\r\n /** A filter used to limit and/or sort the values returned by an iteration. */\r\n export interface PropertyFilter {\r\n /** A value filter. May include wild cards when used with `GLOB` or `LIKE` */\r\n readonly value?: string;\r\n /** The comparison operator for `value`. Default is `=` */\r\n readonly valueCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\r\n /** Order results ascending or descending. If not supplied, the results are unordered (random). */\r\n readonly orderBy?: \"ASC\" | \"DESC\";\r\n /** An SQL expression to further filter results. This string is appended to the `WHERE` clause with an `AND` (that should not be part of the sqlExpression) */\r\n readonly sqlExpression?: string;\r\n }\r\n\r\n /**\r\n * A readonly set of Property values in a PropertyStore.\r\n * @alpha\r\n */\r\n export interface Values {\r\n /** get the value of a Property by name.\r\n * @returns the property's value if it exists, `undefined` otherwise.\r\n */\r\n getProperty(name: PropertyName): PropertyType | undefined;\r\n /** Get the value of a string property by name.\r\n * @returns the property's value if it exists and is a string, `undefined` otherwise.\r\n */\r\n getString(name: PropertyName): string | undefined;\r\n /** Get the value of a string property by name.\r\n * @returns the property's value if it exists and is a string, otherwise the supplied default value.\r\n */\r\n getString(name: PropertyName, defaultValue: string): string;\r\n /** Get the value of a boolean property by name.\r\n * @returns the property's value if it exists and is a boolean, `undefined` otherwise.\r\n */\r\n getBoolean(name: PropertyName): boolean | undefined;\r\n /** Get the value of a boolean property by name.\r\n * @returns the property's value if it exists and is a boolean, otherwise the supplied default value.\r\n */\r\n getBoolean(name: PropertyName, defaultValue: boolean): boolean;\r\n /** Get the value of a number property by name.\r\n * @returns the property's value if it exists and is a number, `undefined` otherwise.\r\n */\r\n getNumber(name: PropertyName): number | undefined;\r\n /** Get the value of a number property by name.\r\n * @returns the property's value if it exists and is a number, otherwise the supplied default value.\r\n */\r\n getNumber(name: PropertyName, defaultValue: number): number;\r\n /** Get the value of a blob property by name.\r\n * @returns the property's value if it exists and is a blob, `undefined` otherwise.\r\n */\r\n getBlob(name: PropertyName): Uint8Array | undefined;\r\n /** Get the value of a blob property by name.\r\n * @returns the property's value if it exists and is a blob, otherwise the supplied default value.\r\n */\r\n getBlob(name: PropertyName, defaultValue: Uint8Array): Uint8Array;\r\n /** Get the value of an object property by name.\r\n * @returns the property's value if it exists and is an object, `undefined` otherwise.\r\n */\r\n getObject<T extends SettingObject>(name: PropertyName): T | undefined;\r\n /** Get the value of an object property by name.\r\n * @returns the property's value if it exists and is an object, otherwise the supplied default value.\r\n */\r\n getObject<T extends SettingObject>(name: PropertyName, defaultValue: T): T;\r\n /** call an iteration function for each property, optionally applying a filter */\r\n forAllProperties(iter: PropertyIteration, filter?: PropertyFilter): void;\r\n }\r\n}\r\n"]}
@@ -167,6 +167,23 @@ export declare namespace SQLiteDb {
167
167
  }
168
168
  /** Parameters for creating a new SQLiteDb */
169
169
  type CreateParams = OpenOrCreateParams & PageSize;
170
+ /** Parameters used to obtain the write lock on a cloud container
171
+ * @internal
172
+ */
173
+ interface ObtainLockParams {
174
+ /** The name of the user attempting to acquire the write lock. This name will be shown to other users while the lock is held. */
175
+ user?: string;
176
+ /** number of times to retry in the event the lock currently held by someone else.
177
+ * After this number of attempts, `onFailure` is called. Default is 20.
178
+ */
179
+ nRetries: number;
180
+ /** Delay between retries, in milliseconds. Default is 100. */
181
+ retryDelayMs: number;
182
+ /** function called if lock cannot be obtained after all retries. It is called with the name of the user currently holding the lock and
183
+ * generally is expected that the user will be consulted whether to wait further.
184
+ * If this function returns "stop", an exception will be thrown. Otherwise the retry cycle is restarted. */
185
+ onFailure?: CloudSqlite.WriteLockBusyHandler;
186
+ }
170
187
  /** @internal */
171
188
  interface LockAndOpenArgs {
172
189
  /** the name to be displayed in the event of lock collisions */
@@ -1 +1 @@
1
- {"version":3,"file":"SQLiteDb.d.ts","sourceRoot":"","sources":["../../src/SQLiteDb.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,cAAc,EA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zE,6DAAa,CAAA;IACf,CAAC,EATW,cAAc,GAAd,uBAAc,KAAd,uBAAc,QASzB;AA4DH,CAAC,EAtFgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAsFxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module SQLiteDb\r\n */\r\n\r\nimport { CloudSqlite, IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { DbResult, IDisposable, OpenMode } from \"@itwin/core-bentley\";\r\nimport { LocalFileName } from \"@itwin/core-common\";\r\nimport { IModelHost } from \"./IModelHost\";\r\nimport { SqliteStatement, StatementCache } from \"./SqliteStatement\";\r\n\r\n// cspell:ignore savepoint\r\n/* eslint-disable @typescript-eslint/unified-signatures */\r\n\r\n/** A SQLiteDb file\r\n * @public\r\n */\r\nexport class SQLiteDb implements IDisposable {\r\n /** @internal */\r\n public readonly nativeDb = new IModelHost.platform.SQLiteDb();\r\n private _sqliteStatementCache = new StatementCache<SqliteStatement>();\r\n\r\n /** @internal */\r\n public static createCloudContainer(args: CloudSqlite.ContainerAccessProps): SQLiteDb.CloudContainer {\r\n return new IModelHost.platform.CloudContainer(args);\r\n }\r\n /** @internal */\r\n public static createCloudCache(args: CloudSqlite.CacheProps): SQLiteDb.CloudCache {\r\n return new IModelHost.platform.CloudCache(args);\r\n }\r\n /** @internal */\r\n public static startCloudPrefetch(container: SQLiteDb.CloudContainer, dbName: string, args?: CloudSqlite.PrefetchProps): SQLiteDb.CloudPrefetch {\r\n return new IModelHost.platform.CloudPrefetch(container, dbName, args);\r\n }\r\n /** @internal */\r\n public static createBlobIO(): SQLiteDb.BlobIO {\r\n return new IModelHost.platform.BlobIO();\r\n }\r\n\r\n /** alias for closeDb. */\r\n public dispose(): void {\r\n this.closeDb();\r\n }\r\n\r\n /** Create a SQLiteDb\r\n * @param dbName The path to the SQLiteDb file to create.\r\n */\r\n public createDb(dbName: string, container?: SQLiteDb.CloudContainer, params?: SQLiteDb.CreateParams): void {\r\n this.nativeDb.createDb(dbName, container, params);\r\n }\r\n\r\n /** Open a SQLiteDb.\r\n * @param dbName The path to the SQLiteDb file to open\r\n */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams): void;\r\n /**\r\n * @param container optional CloudContainer holding database\r\n * @internal\r\n */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: SQLiteDb.CloudContainer): void;\r\n\r\n /** @internal */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: SQLiteDb.CloudContainer): void {\r\n this.nativeDb.openDb(dbName, openMode, container);\r\n }\r\n\r\n /** Close SQLiteDb.\r\n * @param saveChanges if true, call `saveChanges` before closing db. Otherwise unsaved changes are abandoned.\r\n */\r\n public closeDb(saveChanges?: boolean): void {\r\n if (saveChanges && this.isOpen)\r\n this.saveChanges();\r\n this._sqliteStatementCache.clear();\r\n this.nativeDb.closeDb();\r\n }\r\n\r\n /** Returns true if this SQLiteDb is open */\r\n public get isOpen(): boolean { return this.nativeDb.isOpen(); }\r\n\r\n /** Returns true if this SQLiteDb is open readonly */\r\n public get isReadonly(): boolean { return this.nativeDb.isReadonly(); }\r\n\r\n /**\r\n * Open a database, perform an operation, then close the database.\r\n *\r\n * Details:\r\n * - if database is open, throw an error\r\n * - open a database\r\n * - call a function with the database opened. If it is async, await its return.\r\n * - if function throws, abandon all changes, close database, and rethrow\r\n * - save all changes\r\n * - close the database\r\n * @return value from operation\r\n */\r\n public withOpenDb<T>(args: SQLiteDb.WithOpenDbArgs, operation: () => T): T {\r\n if (this.isOpen)\r\n throw new Error(\"database is already open\");\r\n\r\n const save = () => this.closeDb(true), abandon = () => this.closeDb(false);\r\n this.openDb(args.dbName, args.openMode ?? OpenMode.Readonly, args.container);\r\n try {\r\n const result = operation();\r\n result instanceof Promise ? result.then(save, abandon) : save();\r\n return result;\r\n } catch (e) {\r\n abandon();\r\n throw e;\r\n }\r\n }\r\n\r\n /**\r\n * Perform an operation on a database in a CloudContainer with the write lock held.\r\n *\r\n * Details:\r\n * - acquire the write lock on a CloudContainer\r\n * - call `withOpenDb` with openMode `ReadWrite`\r\n * - upload changes\r\n * - release the write lock\r\n * @param args arguments to lock the container and open the database\r\n * @param operation an operation performed on the database with the write lock held.\r\n * @return value from operation\r\n * @internal\r\n */\r\n public async withLockedContainer<T>(args: SQLiteDb.LockAndOpenArgs, operation: () => T) {\r\n return CloudSqlite.withWriteLock(args.user, args.container, () => this.withOpenDb({ ...args, openMode: OpenMode.ReadWrite }, operation), args.busyHandler);\r\n }\r\n\r\n /** vacuum this database\r\n * @see https://www.sqlite.org/lang_vacuum.html\r\n */\r\n public vacuum(args?: SQLiteDb.VacuumDbArgs) {\r\n this.nativeDb.vacuum(args);\r\n }\r\n\r\n /** Commit the outermost transaction, writing changes to the file. Then, restart the transaction. */\r\n public saveChanges(): void {\r\n this.nativeDb.saveChanges();\r\n }\r\n\r\n /** Abandon (cancel) the outermost transaction, discarding all changes since last save. Then, restart the transaction. */\r\n public abandonChanges(): void {\r\n this.nativeDb.abandonChanges();\r\n }\r\n\r\n /**\r\n * Use a prepared SQL statement, potentially from the statement cache. If the requested statement doesn't exist\r\n * in the statement cache, a new statement is prepared. After the callback completes, the statement is reset and saved\r\n * in the statement cache so it can be reused in the future. Use this method for SQL statements that will be\r\n * reused often and are expensive to prepare. The statement cache holds the most recently used statements, discarding\r\n * the oldest statements as it fills. For statements you don't intend to reuse, instead use [[withSqliteStatement]].\r\n * @param sql The SQLite SQL statement to execute\r\n * @param callback the callback to invoke on the prepared statement\r\n * @returns the value returned by `callback`.\r\n */\r\n public withPreparedSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T {\r\n const stmt = this._sqliteStatementCache.findAndRemove(sql) ?? this.prepareSqliteStatement(sql);\r\n const release = () => this._sqliteStatementCache.addOrDispose(stmt);\r\n try {\r\n const val = callback(stmt);\r\n val instanceof Promise ? val.then(release, release) : release();\r\n return val;\r\n } catch (err) {\r\n release();\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Prepared and execute a callback on a SQL statement. After the callback completes the statement is disposed.\r\n * Use this method for SQL statements are either not expected to be reused, or are not expensive to prepare.\r\n * For statements that will be reused often, instead use [[withPreparedSqliteStatement]].\r\n * @param sql The SQLite SQL statement to execute\r\n * @param callback the callback to invoke on the prepared statement\r\n * @returns the value returned by `callback`.\r\n */\r\n public withSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T {\r\n const stmt = this.prepareSqliteStatement(sql);\r\n const release = () => stmt.dispose();\r\n try {\r\n const val = callback(stmt);\r\n val instanceof Promise ? val.then(release, release) : release();\r\n return val;\r\n } catch (err) {\r\n release();\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Perform an operation on this database within a [savepoint](https://www.sqlite.org/lang_savepoint.html). If the operation completes successfully, the\r\n * changes remain in the current transaction. If the operation throws an exception, the savepoint is rolled back\r\n * and all changes to the database from this method are reversed, leaving the transaction exactly as it was before this method.\r\n */\r\n public withSavePoint(savePointName: string, operation: () => void) {\r\n if (this.isReadonly)\r\n throw new Error(\"database is readonly\");\r\n\r\n this.executeSQL(`SAVEPOINT ${savePointName}`);\r\n try {\r\n operation();\r\n this.executeSQL(`RELEASE ${savePointName}`);\r\n } catch (e) {\r\n this.executeSQL(`ROLLBACK TO ${savePointName}`);\r\n throw e;\r\n }\r\n }\r\n\r\n /** Prepare an SQL statement.\r\n * @param sql The SQLite SQL statement to prepare\r\n * @param logErrors Determine if errors are logged or not\r\n * @internal\r\n */\r\n public prepareSqliteStatement(sql: string, logErrors = true): SqliteStatement {\r\n const stmt = new SqliteStatement(sql);\r\n stmt.prepare(this.nativeDb, logErrors);\r\n return stmt;\r\n }\r\n\r\n /** execute an SQL statement */\r\n public executeSQL(sql: string): DbResult {\r\n const stmt = this.prepareSqliteStatement(sql);\r\n try {\r\n return stmt.step();\r\n } finally {\r\n stmt.dispose();\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace SQLiteDb {\r\n /** A CloudSqlite container that may be connected to a CloudCache.\r\n * @internal\r\n */\r\n export type CloudContainer = IModelJsNative.CloudContainer;\r\n /** @internal */\r\n export type CloudCache = IModelJsNative.CloudCache;\r\n /** @internal */\r\n export type CloudPrefetch = IModelJsNative.CloudPrefetch;\r\n /** Incremental IO for blobs\r\n * @internal\r\n */\r\n export type BlobIO = IModelJsNative.BlobIO;\r\n\r\n /** Default transaction mode for SQLiteDbs.\r\n * @see https://www.sqlite.org/lang_transaction.html\r\n */\r\n export enum DefaultTxnMode {\r\n /** no default transaction is started. You must use BEGIN/COMMIT or SQLite will use implicit transactions */\r\n None = 0,\r\n /** A deferred transaction is started when the file is first opened. This is the default. */\r\n Deferred = 1,\r\n /** An immediate transaction is started when the file is first opened. */\r\n Immediate = 2,\r\n /** An exclusive transaction is started when the file is first opened. */\r\n Exclusive = 3\r\n }\r\n\r\n /** parameters common to opening or creating a new SQLiteDb */\r\n export interface OpenOrCreateParams {\r\n /** If true, do not require that the `be_Prop` table exist */\r\n rawSQLite?: boolean;\r\n /** @see immutable option at https://www.sqlite.org/c3ref/open.html */\r\n immutable?: boolean;\r\n /** Do not attempt to verify that the file is a valid sQLite file before opening. */\r\n skipFileCheck?: boolean;\r\n /** the default transaction mode\r\n * @see [[SQLiteDb.DefaultTxnMode]]\r\n */\r\n defaultTxn?: 0 | 1 | 2 | 3;\r\n /** see query parameters from 'URI Filenames' in https://www.sqlite.org/c3ref/open.html */\r\n queryParam?: string;\r\n }\r\n\r\n /** Parameters for opening an existing SQLiteDb */\r\n export interface OpenParams extends OpenOrCreateParams {\r\n /** use OpenMode.ReadWrite to open the file with write access */\r\n openMode: OpenMode;\r\n }\r\n\r\n /** Size of a SQLiteDb page in bytes */\r\n export interface PageSize {\r\n /** see https://www.sqlite.org/pragma.html#pragma_page_size */\r\n pageSize?: number;\r\n }\r\n\r\n /** Parameters for creating a new SQLiteDb */\r\n export type CreateParams = OpenOrCreateParams & PageSize;\r\n\r\n /** @internal */\r\n export interface LockAndOpenArgs {\r\n /** the name to be displayed in the event of lock collisions */\r\n user: string;\r\n /** the name of the database within the container */\r\n dbName: string;\r\n /** the CloudContainer on which the operation will be performed */\r\n container: SQLiteDb.CloudContainer;\r\n /** if present, function called when the write lock is currently held by another user. */\r\n busyHandler?: CloudSqlite.WriteLockBusyHandler;\r\n }\r\n\r\n /** Arguments for `SqliteDb.withOpenDb` */\r\n export interface WithOpenDbArgs {\r\n /** The name of the database to open */\r\n dbName: string;\r\n /** either an object with the open parameters or just OpenMode value. */\r\n openMode?: OpenMode | SQLiteDb.OpenParams;\r\n /** @internal */\r\n container?: SQLiteDb.CloudContainer;\r\n }\r\n\r\n /** Arguments for `SQLiteDb.vacuum` */\r\n export interface VacuumDbArgs extends PageSize {\r\n /** if present, name of new file to [vacuum into](https://www.sqlite.org/lang_vacuum.html) */\r\n into?: LocalFileName;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SQLiteDb.js","sourceRoot":"","sources":["../../src/SQLiteDb.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8DAAuE;AACvE,sDAAsE;AAEtE,6CAA0C;AAC1C,uDAAoE;AAEpE,0BAA0B;AAC1B,0DAA0D;AAE1D;;GAEG;AACH,MAAa,QAAQ;IAArB;QACE,gBAAgB;QACA,aAAQ,GAAG,IAAI,uBAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACtD,0BAAqB,GAAG,IAAI,gCAAc,EAAmB,CAAC;IA+MxE,CAAC;IA7MC,gBAAgB;IACT,MAAM,CAAC,oBAAoB,CAAC,IAAsC;QACvE,OAAO,IAAI,uBAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IACD,gBAAgB;IACT,MAAM,CAAC,gBAA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,QAwGxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module SQLiteDb\r\n */\r\n\r\nimport { CloudSqlite, IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { DbResult, IDisposable, OpenMode } from \"@itwin/core-bentley\";\r\nimport { LocalFileName } from \"@itwin/core-common\";\r\nimport { IModelHost } from \"./IModelHost\";\r\nimport { SqliteStatement, StatementCache } from \"./SqliteStatement\";\r\n\r\n// cspell:ignore savepoint\r\n/* eslint-disable @typescript-eslint/unified-signatures */\r\n\r\n/** A SQLiteDb file\r\n * @public\r\n */\r\nexport class SQLiteDb implements IDisposable {\r\n /** @internal */\r\n public readonly nativeDb = new IModelHost.platform.SQLiteDb();\r\n private _sqliteStatementCache = new StatementCache<SqliteStatement>();\r\n\r\n /** @internal */\r\n public static createCloudContainer(args: CloudSqlite.ContainerAccessProps): SQLiteDb.CloudContainer {\r\n return new IModelHost.platform.CloudContainer(args);\r\n }\r\n /** @internal */\r\n public static createCloudCache(args: CloudSqlite.CacheProps): SQLiteDb.CloudCache {\r\n return new IModelHost.platform.CloudCache(args);\r\n }\r\n /** @internal */\r\n public static startCloudPrefetch(container: SQLiteDb.CloudContainer, dbName: string, args?: CloudSqlite.PrefetchProps): SQLiteDb.CloudPrefetch {\r\n return new IModelHost.platform.CloudPrefetch(container, dbName, args);\r\n }\r\n /** @internal */\r\n public static createBlobIO(): SQLiteDb.BlobIO {\r\n return new IModelHost.platform.BlobIO();\r\n }\r\n\r\n /** alias for closeDb. */\r\n public dispose(): void {\r\n this.closeDb();\r\n }\r\n\r\n /** Create a SQLiteDb\r\n * @param dbName The path to the SQLiteDb file to create.\r\n */\r\n public createDb(dbName: string, container?: SQLiteDb.CloudContainer, params?: SQLiteDb.CreateParams): void {\r\n this.nativeDb.createDb(dbName, container, params);\r\n }\r\n\r\n /** Open a SQLiteDb.\r\n * @param dbName The path to the SQLiteDb file to open\r\n */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams): void;\r\n /**\r\n * @param container optional CloudContainer holding database\r\n * @internal\r\n */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: SQLiteDb.CloudContainer): void;\r\n\r\n /** @internal */\r\n public openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: SQLiteDb.CloudContainer): void {\r\n this.nativeDb.openDb(dbName, openMode, container);\r\n }\r\n\r\n /** Close SQLiteDb.\r\n * @param saveChanges if true, call `saveChanges` before closing db. Otherwise unsaved changes are abandoned.\r\n */\r\n public closeDb(saveChanges?: boolean): void {\r\n if (saveChanges && this.isOpen)\r\n this.saveChanges();\r\n this._sqliteStatementCache.clear();\r\n this.nativeDb.closeDb();\r\n }\r\n\r\n /** Returns true if this SQLiteDb is open */\r\n public get isOpen(): boolean { return this.nativeDb.isOpen(); }\r\n\r\n /** Returns true if this SQLiteDb is open readonly */\r\n public get isReadonly(): boolean { return this.nativeDb.isReadonly(); }\r\n\r\n /**\r\n * Open a database, perform an operation, then close the database.\r\n *\r\n * Details:\r\n * - if database is open, throw an error\r\n * - open a database\r\n * - call a function with the database opened. If it is async, await its return.\r\n * - if function throws, abandon all changes, close database, and rethrow\r\n * - save all changes\r\n * - close the database\r\n * @return value from operation\r\n */\r\n public withOpenDb<T>(args: SQLiteDb.WithOpenDbArgs, operation: () => T): T {\r\n if (this.isOpen)\r\n throw new Error(\"database is already open\");\r\n\r\n const save = () => this.closeDb(true), abandon = () => this.closeDb(false);\r\n this.openDb(args.dbName, args.openMode ?? OpenMode.Readonly, args.container);\r\n try {\r\n const result = operation();\r\n result instanceof Promise ? result.then(save, abandon) : save();\r\n return result;\r\n } catch (e) {\r\n abandon();\r\n throw e;\r\n }\r\n }\r\n\r\n /**\r\n * Perform an operation on a database in a CloudContainer with the write lock held.\r\n *\r\n * Details:\r\n * - acquire the write lock on a CloudContainer\r\n * - call `withOpenDb` with openMode `ReadWrite`\r\n * - upload changes\r\n * - release the write lock\r\n * @param args arguments to lock the container and open the database\r\n * @param operation an operation performed on the database with the write lock held.\r\n * @return value from operation\r\n * @internal\r\n */\r\n public async withLockedContainer<T>(args: SQLiteDb.LockAndOpenArgs, operation: () => T) {\r\n return CloudSqlite.withWriteLock(args.user, args.container, () => this.withOpenDb({ ...args, openMode: OpenMode.ReadWrite }, operation), args.busyHandler);\r\n }\r\n\r\n /** vacuum this database\r\n * @see https://www.sqlite.org/lang_vacuum.html\r\n */\r\n public vacuum(args?: SQLiteDb.VacuumDbArgs) {\r\n this.nativeDb.vacuum(args);\r\n }\r\n\r\n /** Commit the outermost transaction, writing changes to the file. Then, restart the transaction. */\r\n public saveChanges(): void {\r\n this.nativeDb.saveChanges();\r\n }\r\n\r\n /** Abandon (cancel) the outermost transaction, discarding all changes since last save. Then, restart the transaction. */\r\n public abandonChanges(): void {\r\n this.nativeDb.abandonChanges();\r\n }\r\n\r\n /**\r\n * Use a prepared SQL statement, potentially from the statement cache. If the requested statement doesn't exist\r\n * in the statement cache, a new statement is prepared. After the callback completes, the statement is reset and saved\r\n * in the statement cache so it can be reused in the future. Use this method for SQL statements that will be\r\n * reused often and are expensive to prepare. The statement cache holds the most recently used statements, discarding\r\n * the oldest statements as it fills. For statements you don't intend to reuse, instead use [[withSqliteStatement]].\r\n * @param sql The SQLite SQL statement to execute\r\n * @param callback the callback to invoke on the prepared statement\r\n * @returns the value returned by `callback`.\r\n */\r\n public withPreparedSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T {\r\n const stmt = this._sqliteStatementCache.findAndRemove(sql) ?? this.prepareSqliteStatement(sql);\r\n const release = () => this._sqliteStatementCache.addOrDispose(stmt);\r\n try {\r\n const val = callback(stmt);\r\n val instanceof Promise ? val.then(release, release) : release();\r\n return val;\r\n } catch (err) {\r\n release();\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Prepared and execute a callback on a SQL statement. After the callback completes the statement is disposed.\r\n * Use this method for SQL statements are either not expected to be reused, or are not expensive to prepare.\r\n * For statements that will be reused often, instead use [[withPreparedSqliteStatement]].\r\n * @param sql The SQLite SQL statement to execute\r\n * @param callback the callback to invoke on the prepared statement\r\n * @returns the value returned by `callback`.\r\n */\r\n public withSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T {\r\n const stmt = this.prepareSqliteStatement(sql);\r\n const release = () => stmt.dispose();\r\n try {\r\n const val = callback(stmt);\r\n val instanceof Promise ? val.then(release, release) : release();\r\n return val;\r\n } catch (err) {\r\n release();\r\n throw err;\r\n }\r\n }\r\n\r\n /**\r\n * Perform an operation on this database within a [savepoint](https://www.sqlite.org/lang_savepoint.html). If the operation completes successfully, the\r\n * changes remain in the current transaction. If the operation throws an exception, the savepoint is rolled back\r\n * and all changes to the database from this method are reversed, leaving the transaction exactly as it was before this method.\r\n */\r\n public withSavePoint(savePointName: string, operation: () => void) {\r\n if (this.isReadonly)\r\n throw new Error(\"database is readonly\");\r\n\r\n this.executeSQL(`SAVEPOINT ${savePointName}`);\r\n try {\r\n operation();\r\n this.executeSQL(`RELEASE ${savePointName}`);\r\n } catch (e) {\r\n this.executeSQL(`ROLLBACK TO ${savePointName}`);\r\n throw e;\r\n }\r\n }\r\n\r\n /** Prepare an SQL statement.\r\n * @param sql The SQLite SQL statement to prepare\r\n * @param logErrors Determine if errors are logged or not\r\n * @internal\r\n */\r\n public prepareSqliteStatement(sql: string, logErrors = true): SqliteStatement {\r\n const stmt = new SqliteStatement(sql);\r\n stmt.prepare(this.nativeDb, logErrors);\r\n return stmt;\r\n }\r\n\r\n /** execute an SQL statement */\r\n public executeSQL(sql: string): DbResult {\r\n const stmt = this.prepareSqliteStatement(sql);\r\n try {\r\n return stmt.step();\r\n } finally {\r\n stmt.dispose();\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace SQLiteDb {\r\n /** A CloudSqlite container that may be connected to a CloudCache.\r\n * @internal\r\n */\r\n export type CloudContainer = IModelJsNative.CloudContainer;\r\n /** @internal */\r\n export type CloudCache = IModelJsNative.CloudCache;\r\n /** @internal */\r\n export type CloudPrefetch = IModelJsNative.CloudPrefetch;\r\n /** Incremental IO for blobs\r\n * @internal\r\n */\r\n export type BlobIO = IModelJsNative.BlobIO;\r\n\r\n /** Default transaction mode for SQLiteDbs.\r\n * @see https://www.sqlite.org/lang_transaction.html\r\n */\r\n export enum DefaultTxnMode {\r\n /** no default transaction is started. You must use BEGIN/COMMIT or SQLite will use implicit transactions */\r\n None = 0,\r\n /** A deferred transaction is started when the file is first opened. This is the default. */\r\n Deferred = 1,\r\n /** An immediate transaction is started when the file is first opened. */\r\n Immediate = 2,\r\n /** An exclusive transaction is started when the file is first opened. */\r\n Exclusive = 3\r\n }\r\n\r\n /** parameters common to opening or creating a new SQLiteDb */\r\n export interface OpenOrCreateParams {\r\n /** If true, do not require that the `be_Prop` table exist */\r\n rawSQLite?: boolean;\r\n /** @see immutable option at https://www.sqlite.org/c3ref/open.html */\r\n immutable?: boolean;\r\n /** Do not attempt to verify that the file is a valid sQLite file before opening. */\r\n skipFileCheck?: boolean;\r\n /** the default transaction mode\r\n * @see [[SQLiteDb.DefaultTxnMode]]\r\n */\r\n defaultTxn?: 0 | 1 | 2 | 3;\r\n /** see query parameters from 'URI Filenames' in https://www.sqlite.org/c3ref/open.html */\r\n queryParam?: string;\r\n }\r\n\r\n /** Parameters for opening an existing SQLiteDb */\r\n export interface OpenParams extends OpenOrCreateParams {\r\n /** use OpenMode.ReadWrite to open the file with write access */\r\n openMode: OpenMode;\r\n }\r\n\r\n /** Size of a SQLiteDb page in bytes */\r\n export interface PageSize {\r\n /** see https://www.sqlite.org/pragma.html#pragma_page_size */\r\n pageSize?: number;\r\n }\r\n\r\n /** Parameters for creating a new SQLiteDb */\r\n export type CreateParams = OpenOrCreateParams & PageSize;\r\n\r\n /** Parameters used to obtain the write lock on a cloud container\r\n * @internal\r\n */\r\n export interface ObtainLockParams {\r\n /** The name of the user attempting to acquire the write lock. This name will be shown to other users while the lock is held. */\r\n user?: string;\r\n /** number of times to retry in the event the lock currently held by someone else.\r\n * After this number of attempts, `onFailure` is called. Default is 20.\r\n */\r\n nRetries: number;\r\n /** Delay between retries, in milliseconds. Default is 100. */\r\n retryDelayMs: number;\r\n /** function called if lock cannot be obtained after all retries. It is called with the name of the user currently holding the lock and\r\n * generally is expected that the user will be consulted whether to wait further.\r\n * If this function returns \"stop\", an exception will be thrown. Otherwise the retry cycle is restarted. */\r\n onFailure?: CloudSqlite.WriteLockBusyHandler;\r\n }\r\n\r\n /** @internal */\r\n export interface LockAndOpenArgs {\r\n /** the name to be displayed in the event of lock collisions */\r\n user: string;\r\n /** the name of the database within the container */\r\n dbName: string;\r\n /** the CloudContainer on which the operation will be performed */\r\n container: SQLiteDb.CloudContainer;\r\n /** if present, function called when the write lock is currently held by another user. */\r\n busyHandler?: CloudSqlite.WriteLockBusyHandler;\r\n }\r\n\r\n /** Arguments for `SqliteDb.withOpenDb` */\r\n export interface WithOpenDbArgs {\r\n /** The name of the database to open */\r\n dbName: string;\r\n /** either an object with the open parameters or just OpenMode value. */\r\n openMode?: OpenMode | SQLiteDb.OpenParams;\r\n /** @internal */\r\n container?: SQLiteDb.CloudContainer;\r\n }\r\n\r\n /** Arguments for `SQLiteDb.vacuum` */\r\n export interface VacuumDbArgs extends PageSize {\r\n /** if present, name of new file to [vacuum into](https://www.sqlite.org/lang_vacuum.html) */\r\n into?: LocalFileName;\r\n }\r\n}\r\n"]}
@@ -46,6 +46,7 @@ export * from "./IModelSchemaLoader";
46
46
  export * from "./IpcHost";
47
47
  export * from "./NativeAppStorage";
48
48
  export * from "./NativeHost";
49
+ export * from "./PropertyStore";
49
50
  export * from "./CloudStorageBackend";
50
51
  export * from "./AliCloudStorageService";
51
52
  export * from "./DevTools";
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../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AAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC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GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -66,6 +66,7 @@ __exportStar(require("./IModelSchemaLoader"), exports);
66
66
  __exportStar(require("./IpcHost"), exports);
67
67
  __exportStar(require("./NativeAppStorage"), exports);
68
68
  __exportStar(require("./NativeHost"), exports);
69
+ __exportStar(require("./PropertyStore"), exports);
69
70
  __exportStar(require("./CloudStorageBackend"), exports);
70
71
  __exportStar(require("./AliCloudStorageService"), exports);
71
72
  __exportStar(require("./DevTools"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
1
+ {"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,sDAAoC;AACpC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,kDAAgC;AAChC,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeService\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./ElementTreeWalker\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./GeoCoordConfig\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./PropertyStore\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/Workspace.ts"],"names":[],"mappings":"AAIA;;G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E,aAAa;IAejD;;;OAGG;IACI,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAMpE;;;;OAIG;IACI,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAKvE,gCAAgC;IACzB,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,GAAG,IAAI;IAI1D;;;OAGG;IACI,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;IAMtE;;;;OAIG;IACI,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI;IAKzE;;OAEG;IACI,aAAa,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM;IAStE,8BAA8B;IACvB,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,GAAG,IAAI;IAIxD;;;;;;OAMG;IACI,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAQrG;;;;OAIG;IACI,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI;IAKtF,8BAA8B;IACvB,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,IAAI,GAAG,IAAI;CAQzD"}
@@ -438,8 +438,14 @@ class EditableWorkspaceDb extends ITwinWorkspaceDb {
438
438
  const db = new SQLiteDb_1.SQLiteDb();
439
439
  IModelJsFs_1.IModelJsFs.recursiveMkDirSync((0, path_1.dirname)(fileName));
440
440
  db.createDb(fileName);
441
- db.executeSQL("CREATE TABLE strings(id TEXT PRIMARY KEY NOT NULL,value TEXT)");
442
- db.executeSQL("CREATE TABLE blobs(id TEXT PRIMARY KEY NOT NULL,value BLOB)");
441
+ const timeStampCol = "lastMod TIMESTAMP NOT NULL DEFAULT(julianday('now'))";
442
+ db.executeSQL(`CREATE TABLE strings(id TEXT PRIMARY KEY NOT NULL,value TEXT,${timeStampCol})`);
443
+ db.executeSQL(`CREATE TABLE blobs(id TEXT PRIMARY KEY NOT NULL,value BLOB,${timeStampCol})`);
444
+ const createTrigger = (tableName) => {
445
+ db.executeSQL(`CREATE TRIGGER ${tableName}_timeStamp AFTER UPDATE ON ${tableName} WHEN old.lastMod=new.lastMod AND old.lastMod != julianday('now') BEGIN UPDATE ${tableName} SET lastMod=julianday('now') WHERE id=new.id; END`);
446
+ };
447
+ createTrigger("strings");
448
+ createTrigger("blobs");
443
449
  db.closeDb(true);
444
450
  }
445
451
  /** Add a new string resource to this WorkspaceDb.