@dittolive/ditto 4.4.2-alpha1 → 4.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/node/ditto.cjs.js +75 -312
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/package.json +1 -1
- package/types/ditto.d.ts +40 -137
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dittolive/ditto",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3",
|
|
4
4
|
"description": "Ditto is a cross-platform embeddable NoSQL database that can sync with or without an internet connection.",
|
|
5
5
|
"homepage": "https://ditto.live",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/types/ditto.d.ts
CHANGED
|
@@ -72,8 +72,8 @@ declare class ObserverManager {
|
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
74
74
|
interface ObserverManaging {
|
|
75
|
-
hasObserver(token: ObserverToken):
|
|
76
|
-
removeObserver(token: ObserverToken):
|
|
75
|
+
hasObserver(token: ObserverToken): any;
|
|
76
|
+
removeObserver(token: ObserverToken): any;
|
|
77
77
|
}
|
|
78
78
|
/** @internal */
|
|
79
79
|
type ObserverOptions = {
|
|
@@ -89,7 +89,7 @@ declare class Observer {
|
|
|
89
89
|
/** @internal */
|
|
90
90
|
readonly observerManager: ObserverManaging;
|
|
91
91
|
/** @internal */
|
|
92
|
-
|
|
92
|
+
readonly token?: ObserverToken;
|
|
93
93
|
/** @internal */
|
|
94
94
|
readonly options?: ObserverOptions;
|
|
95
95
|
/** @internal */
|
|
@@ -104,7 +104,6 @@ declare class Observer {
|
|
|
104
104
|
*/
|
|
105
105
|
stop(): void;
|
|
106
106
|
private static finalizationRegistry;
|
|
107
|
-
private _token?;
|
|
108
107
|
private static finalize;
|
|
109
108
|
}
|
|
110
109
|
|
|
@@ -140,23 +139,6 @@ type WriteStrategy = 'merge' | 'insertIfAbsent' | 'insertDefaultIfAbsent';
|
|
|
140
139
|
type QueryArguments = {
|
|
141
140
|
[key: string]: any;
|
|
142
141
|
};
|
|
143
|
-
/**
|
|
144
|
-
* Values to be incorporated into a query keyed by the placeholder used within
|
|
145
|
-
* that query.
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
148
|
-
*/
|
|
149
|
-
type DQLQueryArguments = {
|
|
150
|
-
[key: string]: DQLQueryArgumentValue;
|
|
151
|
-
};
|
|
152
|
-
/**
|
|
153
|
-
* Value for an invidual key in a {@link DQLQueryArguments} object.
|
|
154
|
-
*
|
|
155
|
-
* @internal
|
|
156
|
-
*/
|
|
157
|
-
type DQLQueryArgumentValue = string | number | boolean | Uint8Array | undefined | null | DQLQueryArgumentValue[] | {
|
|
158
|
-
[key: string | number]: DQLQueryArgumentValue;
|
|
159
|
-
};
|
|
160
142
|
|
|
161
143
|
/** @internal */
|
|
162
144
|
declare class Value {
|
|
@@ -171,16 +153,15 @@ declare class Value {
|
|
|
171
153
|
*/
|
|
172
154
|
declare class Counter {
|
|
173
155
|
/** The value of the counter. */
|
|
174
|
-
|
|
156
|
+
readonly value: number;
|
|
175
157
|
/**
|
|
176
158
|
* Creates a new counter that can be used as part of a document's content.
|
|
177
159
|
*/
|
|
178
160
|
constructor();
|
|
179
161
|
/** @internal */
|
|
180
162
|
static '@ditto.create'(mutDoc: any, path: any, value: any): any;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
protected _value: number;
|
|
163
|
+
private mutDoc;
|
|
164
|
+
private path;
|
|
184
165
|
}
|
|
185
166
|
/**
|
|
186
167
|
* Represents a mutable CRDT counter that can be incremented by a specific
|
|
@@ -200,7 +181,7 @@ declare class MutableCounter extends Counter {
|
|
|
200
181
|
*/
|
|
201
182
|
increment(amount: number): void;
|
|
202
183
|
/** @internal */
|
|
203
|
-
|
|
184
|
+
constructor();
|
|
204
185
|
}
|
|
205
186
|
|
|
206
187
|
/**
|
|
@@ -320,7 +301,7 @@ declare class Logger {
|
|
|
320
301
|
* Registers a file path where logs will be written to, whenever Ditto wants
|
|
321
302
|
* to issue a log (on _top_ of emitting the log to the console).
|
|
322
303
|
*/
|
|
323
|
-
static
|
|
304
|
+
static readonly logFile?: string;
|
|
324
305
|
/**
|
|
325
306
|
* On Node, registers a file path where logs will be written to, whenever
|
|
326
307
|
* Ditto wants to issue a log (on _top_ of emitting the log to the console).
|
|
@@ -369,7 +350,7 @@ declare class Logger {
|
|
|
369
350
|
* {@link setCustomLogCallback | setCustomLogCallback()} for a detailed
|
|
370
351
|
* description.
|
|
371
352
|
*/
|
|
372
|
-
static
|
|
353
|
+
static readonly customLogCallback?: CustomLogCallback;
|
|
373
354
|
/**
|
|
374
355
|
* Registers a custom callback that will be called to report each log entry.
|
|
375
356
|
*
|
|
@@ -413,8 +394,6 @@ declare class Logger {
|
|
|
413
394
|
* {@link LogLevel} `Verbose`.
|
|
414
395
|
*/
|
|
415
396
|
static verbose(message: string): void;
|
|
416
|
-
private static _logFile?;
|
|
417
|
-
private static _customLogCallback?;
|
|
418
397
|
private constructor();
|
|
419
398
|
}
|
|
420
399
|
|
|
@@ -826,9 +805,6 @@ interface TransportConfigPeerToPeer {
|
|
|
826
805
|
interface TransportConfigLan {
|
|
827
806
|
isEnabled: boolean;
|
|
828
807
|
isMdnsEnabled: boolean;
|
|
829
|
-
/**
|
|
830
|
-
* @deprecated Multicast is deprecated. Please use mDNS instead.
|
|
831
|
-
*/
|
|
832
808
|
isMulticastEnabled: boolean;
|
|
833
809
|
}
|
|
834
810
|
/**
|
|
@@ -939,7 +915,7 @@ declare class TransportConfig {
|
|
|
939
915
|
* Returns `true` if the transport configuration is frozen, otherwise
|
|
940
916
|
* returns `false`.
|
|
941
917
|
*/
|
|
942
|
-
|
|
918
|
+
readonly isFrozen: boolean;
|
|
943
919
|
/**
|
|
944
920
|
* (Deep) freezes the receiver such that it can't be modified anymore.
|
|
945
921
|
*/
|
|
@@ -958,7 +934,6 @@ declare class TransportConfig {
|
|
|
958
934
|
* returns `false`.
|
|
959
935
|
*/
|
|
960
936
|
static areListenHTTPsEqual(left: TransportConfigListenHTTP, right: TransportConfigListenHTTP): boolean;
|
|
961
|
-
private _isFrozen;
|
|
962
937
|
}
|
|
963
938
|
|
|
964
939
|
/**
|
|
@@ -1022,7 +997,7 @@ declare class Authenticator {
|
|
|
1022
997
|
/**
|
|
1023
998
|
Returns the current authentication status.
|
|
1024
999
|
*/
|
|
1025
|
-
|
|
1000
|
+
readonly status: AuthenticationStatus;
|
|
1026
1001
|
/**
|
|
1027
1002
|
* Log in to Ditto with a third-party token. Throws if authentication is not
|
|
1028
1003
|
* available, which can be checked with {@link loginSupported}.
|
|
@@ -1052,7 +1027,7 @@ declare class Authenticator {
|
|
|
1052
1027
|
* [Ditto] instance as the sole argument that allows you to perform any
|
|
1053
1028
|
* required cleanup of the store as part of the logout process.
|
|
1054
1029
|
*/
|
|
1055
|
-
logout(cleanupFn?: (
|
|
1030
|
+
logout(cleanupFn?: (Ditto: any) => void): Promise<void>;
|
|
1056
1031
|
observeStatus(callback: (authenticationStatus: AuthenticationStatus) => void): Observer;
|
|
1057
1032
|
/** @internal */
|
|
1058
1033
|
constructor(keepAlive: KeepAlive);
|
|
@@ -1066,15 +1041,12 @@ declare class Authenticator {
|
|
|
1066
1041
|
protected keepAlive: KeepAlive;
|
|
1067
1042
|
/** @internal */
|
|
1068
1043
|
protected observerManager: ObserverManager;
|
|
1069
|
-
/** @internal */
|
|
1070
|
-
protected _status: AuthenticationStatus;
|
|
1071
1044
|
}
|
|
1072
1045
|
/** @internal */
|
|
1073
1046
|
declare class OnlineAuthenticator extends Authenticator {
|
|
1074
|
-
readonly loginSupported: boolean;
|
|
1075
1047
|
loginWithToken(token: string, provider: string): Promise<void>;
|
|
1076
1048
|
loginWithUsernameAndPassword(username: string, password: string, provider: string): Promise<void>;
|
|
1077
|
-
logout(cleanupFn?: (
|
|
1049
|
+
logout(cleanupFn?: (Ditto: any) => void): Promise<void>;
|
|
1078
1050
|
readonly authenticationHandler: AuthenticationHandler;
|
|
1079
1051
|
private ditto;
|
|
1080
1052
|
constructor(keepAlive: KeepAlive, ditto: Ditto, authenticationHandler: AuthenticationHandler);
|
|
@@ -1084,11 +1056,11 @@ declare class OnlineAuthenticator extends Authenticator {
|
|
|
1084
1056
|
}
|
|
1085
1057
|
/** @internal */
|
|
1086
1058
|
declare class NotAvailableAuthenticator extends Authenticator {
|
|
1087
|
-
loginWithToken(token: string, provider: string): Promise<
|
|
1088
|
-
loginWithUsernameAndPassword(username: string, password: string, provider: string): Promise<
|
|
1089
|
-
logout(cleanupFn?: (
|
|
1090
|
-
'@ditto.authenticationExpiring'(secondsRemaining:
|
|
1091
|
-
'@ditto.authClientValidityChanged'(isWebValid: boolean, isX509Valid: boolean):
|
|
1059
|
+
loginWithToken(token: string, provider: string): Promise<void>;
|
|
1060
|
+
loginWithUsernameAndPassword(username: string, password: string, provider: string): Promise<void>;
|
|
1061
|
+
logout(cleanupFn?: (Ditto: any) => void): Promise<void>;
|
|
1062
|
+
'@ditto.authenticationExpiring'(secondsRemaining: any): void;
|
|
1063
|
+
'@ditto.authClientValidityChanged'(isWebValid: boolean, isX509Valid: boolean): void;
|
|
1092
1064
|
}
|
|
1093
1065
|
|
|
1094
1066
|
/**
|
|
@@ -1428,7 +1400,7 @@ declare class Subscription {
|
|
|
1428
1400
|
* Returns `true` if subscription has been explicitly cancelled, `false`
|
|
1429
1401
|
* otherwise.
|
|
1430
1402
|
*/
|
|
1431
|
-
|
|
1403
|
+
readonly isCancelled = false;
|
|
1432
1404
|
/**
|
|
1433
1405
|
* The name of the collection that the subscription is based on.
|
|
1434
1406
|
*/
|
|
@@ -1444,6 +1416,8 @@ declare class Subscription {
|
|
|
1444
1416
|
* @internal Because not exposed in any of the other SDKs (yet?).
|
|
1445
1417
|
*/
|
|
1446
1418
|
readonly collection: Collection;
|
|
1419
|
+
/** @internal */
|
|
1420
|
+
private readonly manager;
|
|
1447
1421
|
/**
|
|
1448
1422
|
* The corresponding named arguments for {@link query}, if any.
|
|
1449
1423
|
* @internal Because not exposed in any of the other SDKs (yet?).
|
|
@@ -1451,8 +1425,6 @@ declare class Subscription {
|
|
|
1451
1425
|
readonly queryArgsCBOR: Uint8Array | null;
|
|
1452
1426
|
/** @internal */
|
|
1453
1427
|
readonly contextInfo: SubscriptionContextInfo;
|
|
1454
|
-
private readonly manager;
|
|
1455
|
-
private _isCancelled;
|
|
1456
1428
|
}
|
|
1457
1429
|
|
|
1458
1430
|
/**
|
|
@@ -1739,19 +1711,14 @@ declare class LiveQuery {
|
|
|
1739
1711
|
readonly collection: Collection;
|
|
1740
1712
|
/** @internal */
|
|
1741
1713
|
readonly handler: QueryObservationHandler;
|
|
1742
|
-
/**
|
|
1743
|
-
* This field is only populated while a live query is active and set to null
|
|
1744
|
-
* when the live query is stopped.
|
|
1745
|
-
*
|
|
1746
|
-
* @internal
|
|
1747
|
-
*/
|
|
1714
|
+
/** @internal */
|
|
1748
1715
|
liveQueryManager: LiveQueryManager | null;
|
|
1749
|
-
|
|
1716
|
+
/** @internal */
|
|
1717
|
+
readonly liveQueryID: number;
|
|
1750
1718
|
/** @internal */
|
|
1751
1719
|
constructor(query: string, queryArgs: QueryArguments | null, queryArgsCBOR: Uint8Array | null, orderBys: OrderBy[], limit: number, offset: number, collection: Collection, handler: QueryObservationHandler);
|
|
1752
1720
|
/** @internal */
|
|
1753
1721
|
signalNext(): Promise<void>;
|
|
1754
|
-
private _liveQueryID;
|
|
1755
1722
|
}
|
|
1756
1723
|
|
|
1757
1724
|
/** @internal */
|
|
@@ -1975,18 +1942,18 @@ declare class Ditto {
|
|
|
1975
1942
|
*
|
|
1976
1943
|
* @see {@link setOfflineOnlyLicenseToken | setOfflineOnlyLicenseToken()}
|
|
1977
1944
|
*/
|
|
1978
|
-
|
|
1945
|
+
readonly isActivated: boolean;
|
|
1979
1946
|
/**
|
|
1980
1947
|
* `true` once {@link close | Ditto.close()} has been called, otherwise
|
|
1981
1948
|
* `false`.
|
|
1982
1949
|
*/
|
|
1983
|
-
|
|
1950
|
+
readonly isClosed: boolean;
|
|
1984
1951
|
/**
|
|
1985
1952
|
* Returns `true` if sync is active, otherwise returns `false`. Use
|
|
1986
1953
|
* {@link startSync | startSync()} to activate and
|
|
1987
1954
|
* {@link stopSync | stopSync()} to deactivate sync.
|
|
1988
1955
|
*/
|
|
1989
|
-
|
|
1956
|
+
readonly isSyncActive: boolean;
|
|
1990
1957
|
/**
|
|
1991
1958
|
* Application ID associated with the {@link Identity | identity} used by this
|
|
1992
1959
|
* Ditto instance.
|
|
@@ -2087,7 +2054,7 @@ declare class Ditto {
|
|
|
2087
2054
|
* @see {@link setTransportConfig | setTransportConfig()}
|
|
2088
2055
|
* @see {@link updateTransportConfig | updateTransportConfig()}
|
|
2089
2056
|
*/
|
|
2090
|
-
|
|
2057
|
+
readonly transportConfig: TransportConfig;
|
|
2091
2058
|
/**
|
|
2092
2059
|
* Assigns a new transports configuration. By default peer-to-peer transports
|
|
2093
2060
|
* (Bluetooth, WiFi, and AWDL) are enabled. You may use this method to alter
|
|
@@ -2234,10 +2201,6 @@ declare class Ditto {
|
|
|
2234
2201
|
private isX509Valid;
|
|
2235
2202
|
private presenceManager;
|
|
2236
2203
|
private transportConditionsManager;
|
|
2237
|
-
private _isActivated;
|
|
2238
|
-
private _isSyncActive;
|
|
2239
|
-
private _isClosed;
|
|
2240
|
-
private _transportConfig;
|
|
2241
2204
|
/** Set of pending operations that need to complete before the Ditto instance can be closed in a safe manner. */
|
|
2242
2205
|
private pendingOperations;
|
|
2243
2206
|
private authClientValidityChanged;
|
|
@@ -2253,7 +2216,7 @@ declare class Ditto {
|
|
|
2253
2216
|
* @returns `true` iff all required APIs exist on `global`.
|
|
2254
2217
|
* @internal
|
|
2255
2218
|
*/
|
|
2256
|
-
declare const checkAPIs: (_globalObject?: typeof globalThis) => boolean;
|
|
2219
|
+
declare const checkAPIs: (_globalObject?: Window | typeof globalThis) => boolean;
|
|
2257
2220
|
/**
|
|
2258
2221
|
* Disable deadlock timeout when Node.js is running with `--inspect` parameter.
|
|
2259
2222
|
*
|
|
@@ -2778,9 +2741,9 @@ declare class ExperimentalChangeListener {
|
|
|
2778
2741
|
/**
|
|
2779
2742
|
* The arguments to this listener's query.
|
|
2780
2743
|
*/
|
|
2781
|
-
readonly queryArgs?:
|
|
2744
|
+
readonly queryArgs?: QueryArguments;
|
|
2782
2745
|
/** @internal */
|
|
2783
|
-
constructor(store: ExperimentalStore, query: string, queryArgs:
|
|
2746
|
+
constructor(store: ExperimentalStore, query: string, queryArgs: QueryArguments | null, onChange: ChangeHandler | ChangeHandlerWithSignalNext, onError?: ErrorHandler, withSignalNext?: boolean);
|
|
2784
2747
|
/**
|
|
2785
2748
|
* A change listener starts out in the `active` state and can be stopped by
|
|
2786
2749
|
* calling {@link ExperimentalChangeListener.stop | `stop()`} or letting it go
|
|
@@ -2945,7 +2908,7 @@ declare class ExperimentalReplicationSubscription {
|
|
|
2945
2908
|
* `true` when {@link cancel | cancel()} has been called or the Ditto instance
|
|
2946
2909
|
* managing this replication subscription has been closed.
|
|
2947
2910
|
*/
|
|
2948
|
-
|
|
2911
|
+
readonly isCancelled = false;
|
|
2949
2912
|
/**
|
|
2950
2913
|
* Cancels a replication subscription and releases all associated resources.
|
|
2951
2914
|
*/
|
|
@@ -2960,53 +2923,8 @@ declare class ExperimentalReplicationSubscription {
|
|
|
2960
2923
|
* @internal
|
|
2961
2924
|
*/
|
|
2962
2925
|
readonly queryArgsCBOR: Uint8Array | null;
|
|
2963
|
-
private _isCancelled;
|
|
2964
|
-
private manager;
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
/**
|
|
2968
|
-
* Represents single result object.
|
|
2969
|
-
* This API needs to be completed to navigate in the result object.
|
|
2970
|
-
* The result object is retrieved via FFI.dqlResultCBOR(Pointer<FFIDqlResult>).
|
|
2971
|
-
*
|
|
2972
|
-
* Currently experimental.
|
|
2973
|
-
*
|
|
2974
|
-
* @internal
|
|
2975
|
-
*/
|
|
2976
|
-
declare class ExperimentalDqlResult {
|
|
2977
|
-
get value(): any;
|
|
2978
2926
|
/** @internal */
|
|
2979
|
-
|
|
2980
|
-
/**
|
|
2981
|
-
* FIXME: warn users who try to instantiate this class themselves
|
|
2982
|
-
*
|
|
2983
|
-
* @internal
|
|
2984
|
-
*/
|
|
2985
|
-
constructor();
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
|
-
/**
|
|
2989
|
-
* Represents the response from executing DQL statements.
|
|
2990
|
-
* Currently experimental.
|
|
2991
|
-
*
|
|
2992
|
-
* The memory management is quite complex. Every time when Rust is called
|
|
2993
|
-
* it will clone the result object. Rust mirror of DqlResponse contains
|
|
2994
|
-
* the collection of result objects. During the getting results call
|
|
2995
|
-
* Rust will copy DqlResult obejcts, thus JS here gets complete control
|
|
2996
|
-
* of their lifetimes.
|
|
2997
|
-
*
|
|
2998
|
-
* @internal
|
|
2999
|
-
*/
|
|
3000
|
-
declare class ExperimentalDqlResponse {
|
|
3001
|
-
get results(): ExperimentalDqlResult[];
|
|
3002
|
-
/** @internal */
|
|
3003
|
-
storedResults: ExperimentalDqlResult[] | undefined;
|
|
3004
|
-
/**
|
|
3005
|
-
* FIXME: warn users who try to instantiate this class themselves
|
|
3006
|
-
*
|
|
3007
|
-
* @internal
|
|
3008
|
-
*/
|
|
3009
|
-
constructor();
|
|
2927
|
+
private manager;
|
|
3010
2928
|
}
|
|
3011
2929
|
|
|
3012
2930
|
/**
|
|
@@ -3046,7 +2964,7 @@ declare class ExperimentalStore {
|
|
|
3046
2964
|
*
|
|
3047
2965
|
* @internal
|
|
3048
2966
|
*/
|
|
3049
|
-
addChangeListener(query: string, onChange: ChangeHandler, onError?: ErrorHandler, queryArgs?:
|
|
2967
|
+
addChangeListener(query: string, onChange: ChangeHandler, onError?: ErrorHandler, queryArgs?: QueryArguments): ExperimentalChangeListener;
|
|
3050
2968
|
/**
|
|
3051
2969
|
* Register a handler to be called whenever a query's results change in the
|
|
3052
2970
|
* local store and control when the next invocation of the change handler
|
|
@@ -3062,7 +2980,7 @@ declare class ExperimentalStore {
|
|
|
3062
2980
|
*
|
|
3063
2981
|
* @internal
|
|
3064
2982
|
*/
|
|
3065
|
-
addChangeListenerWithSignalNext(query: string, onChange: ChangeHandlerWithSignalNext, onError?: ErrorHandler, queryArgs?:
|
|
2983
|
+
addChangeListenerWithSignalNext(query: string, onChange: ChangeHandlerWithSignalNext, onError?: ErrorHandler, queryArgs?: QueryArguments): ExperimentalChangeListener;
|
|
3066
2984
|
/**
|
|
3067
2985
|
* Registers a URL to be called whenever the given query observes changes.
|
|
3068
2986
|
*
|
|
@@ -3071,7 +2989,7 @@ declare class ExperimentalStore {
|
|
|
3071
2989
|
* @internal
|
|
3072
2990
|
* @returns a promise for a document id that acts as a webhook id
|
|
3073
2991
|
*/
|
|
3074
|
-
addChangeListenerWebhook(query: string, url: string, queryArgs?:
|
|
2992
|
+
addChangeListenerWebhook(query: string, url: string, queryArgs?: QueryArguments): Promise<DocumentID>;
|
|
3075
2993
|
/**
|
|
3076
2994
|
* Run the provided query on the device of connected peers and send the
|
|
3077
2995
|
* results of the query back to the local peer's data store.
|
|
@@ -3079,44 +2997,29 @@ declare class ExperimentalStore {
|
|
|
3079
2997
|
* The returned {@link ExperimentalReplicationSubscription} object must be kept in scope
|
|
3080
2998
|
* for as long as you want to keep receiving updates.
|
|
3081
2999
|
*
|
|
3082
|
-
* Use placeholders to incorporate values from the optional `queryArguments`
|
|
3083
|
-
* parameter into the query. The keys of the `queryArguments` object must
|
|
3084
|
-
* match the placeholders used within the query. You can not use placeholders
|
|
3085
|
-
* in the `FROM` clause.
|
|
3086
|
-
*
|
|
3087
3000
|
* @internal
|
|
3088
3001
|
* @param query a Ditto Query Language query string of the form SELECT * FROM
|
|
3089
3002
|
* collection WHERE expression
|
|
3090
|
-
* @param queryArguments an object with values to be incorporated into a
|
|
3091
|
-
* query. The keys of the object must match the placeholders used within the
|
|
3092
|
-
* query.
|
|
3093
3003
|
* @returns {@link ExperimentalReplicationSubscription} object
|
|
3094
3004
|
*/
|
|
3095
|
-
addReplicationSubscription(query: string
|
|
3005
|
+
addReplicationSubscription(query: string): ExperimentalReplicationSubscription;
|
|
3096
3006
|
/** @internal */
|
|
3097
3007
|
close(): void;
|
|
3098
3008
|
/**
|
|
3099
3009
|
* Executes the given query in the local store and returns the result.
|
|
3100
3010
|
*
|
|
3101
|
-
* Use placeholders to incorporate values from the optional `queryArguments`
|
|
3102
|
-
* parameter into the query. The keys of the `queryArguments` object must
|
|
3103
|
-
* match the placeholders used within the query. You can not use placeholders
|
|
3104
|
-
* in the `FROM` clause.
|
|
3105
|
-
*
|
|
3106
3011
|
* Limitations:
|
|
3107
3012
|
*
|
|
3108
3013
|
* - Supports `SELECT * FROM <collection name>` with optional `WHERE
|
|
3109
3014
|
* <expression>`
|
|
3015
|
+
* - No query parameters as function arguments yet
|
|
3110
3016
|
* - No transactions
|
|
3111
3017
|
*
|
|
3112
3018
|
* @internal
|
|
3113
3019
|
* @param query a Ditto Query Language query string
|
|
3114
|
-
* @param queryArguments an object with values to be incorporated into a
|
|
3115
|
-
* query. The keys of the object must match the placeholders used within the
|
|
3116
|
-
* query.
|
|
3117
3020
|
* @returns a promise for an array of Ditto documents matching the query
|
|
3118
3021
|
*/
|
|
3119
|
-
execute(query: string
|
|
3022
|
+
execute(query: string): Promise<Document[]>;
|
|
3120
3023
|
private replicationSubscriptionManager;
|
|
3121
3024
|
}
|
|
3122
3025
|
|
|
@@ -3518,5 +3421,5 @@ declare class CBOR {
|
|
|
3518
3421
|
static decode(data: Uint8Array): any;
|
|
3519
3422
|
}
|
|
3520
3423
|
|
|
3521
|
-
export { Address, Attachment, AttachmentFetchEvent, AttachmentFetchEventCompleted, AttachmentFetchEventDeleted, AttachmentFetchEventProgress, AttachmentFetchEventType, AttachmentFetcher, AttachmentToken, AuthenticationHandler, AuthenticationStatus, Authenticator, BasePendingCursorOperation, BasePendingIDSpecificOperation, CBOR, ChangeHandler, ChangeHandlerWithSignalNext, Collection, CollectionInterface, CollectionsEvent, CollectionsEventParams, CollectionsObservationHandler, ConditionSource, Connection, ConnectionType, Counter, CustomLogCallback,
|
|
3424
|
+
export { Address, Attachment, AttachmentFetchEvent, AttachmentFetchEventCompleted, AttachmentFetchEventDeleted, AttachmentFetchEventProgress, AttachmentFetchEventType, AttachmentFetcher, AttachmentToken, AuthenticationHandler, AuthenticationStatus, Authenticator, BasePendingCursorOperation, BasePendingIDSpecificOperation, CBOR, ChangeHandler, ChangeHandlerWithSignalNext, Collection, CollectionInterface, CollectionsEvent, CollectionsEventParams, CollectionsObservationHandler, ConditionSource, Connection, ConnectionType, Counter, CustomLogCallback, Ditto, Document, DocumentID, DocumentIDValue, DocumentPath, DocumentValue, ErrorHandler, ExperimentalChangeListener, ExperimentalChangeListenerManager, ExperimentalChangeListenerStatus, ExperimentalReplicationSubscription, ExperimentalReplicationSubscriptionContextInfo, ExperimentalReplicationSubscriptionManager, ExperimentalStore, Identity, IdentityManual, IdentityOfflinePlayground, IdentityOnlinePlayground, IdentityOnlineWithAuthentication, IdentitySharedKey, IdentityTypesRequiringOfflineLicenseToken, InitOptions, KeepAlive, LiveQuery, LiveQueryEvent, LiveQueryEventInitial, LiveQueryEventUpdate, LiveQueryEventUpdateParams, LiveQueryMove, LogLevel, Logger, MutableCounter, MutableDocument, MutableDocumentPath, MutableRegister, NotAvailableAuthenticator, Observer, ObserverOptions, OnlineAuthenticator, Peer, PendingCollectionsOperation, PendingCursorOperation, PendingIDSpecificOperation, Presence, PresenceConnectionType, PresenceGraph, QueryArguments, QueryObservationHandler, Register, RemotePeer, SingleDocumentLiveQueryEvent, SingleObservationHandler, SortDirection, Store, Subscription, TransportCondition, TransportConfig, TransportConfigConnect, TransportConfigGlobal, TransportConfigLan, TransportConfigListen, TransportConfigListenHTTP, TransportConfigListenTCP, TransportConfigPeerToPeer, UpdateResult, UpdateResultType, UpdateResultsMap, UpsertOptions, Value, WebAssemblyModule, WriteStrategy, WriteTransaction, WriteTransactionCollection, WriteTransactionPendingCursorOperation, WriteTransactionPendingIDSpecificOperation, WriteTransactionResult, addressToString, checkAPIs, disableDeadlockTimeoutWhenDebugging, getBridgeLoad, init, transportConfigFromDeserializable, transportConfigToSerializable, validateDocumentIDCBOR, validateDocumentIDValue };
|
|
3522
3425
|
//# sourceMappingURL=ditto.d.ts.map
|