@firebase/database 0.8.3-canary.fb90580e5 → 0.8.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.
Files changed (134) hide show
  1. package/dist/index.d.ts +0 -16
  2. package/dist/index.esm.js +34 -163
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.esm2017.js +34 -161
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.node.cjs.js +34 -163
  7. package/dist/index.node.cjs.js.map +1 -1
  8. package/dist/src/api/Query.d.ts +0 -2
  9. package/dist/src/core/AuthTokenProvider.d.ts +2 -2
  10. package/dist/src/core/Repo.d.ts +21 -10
  11. package/dist/src/core/RepoManager.d.ts +2 -8
  12. package/dist/src/core/util/NextPushId.d.ts +0 -2
  13. package/dist/src/core/util/util.d.ts +0 -8
  14. package/dist/src/core/view/QueryParams.d.ts +0 -6
  15. package/package.json +13 -16
  16. package/dist/exp/exp/index.d.ts +0 -29
  17. package/dist/exp/index.d.ts +0 -49
  18. package/dist/exp/index.esm.js +0 -15735
  19. package/dist/exp/index.esm.js.map +0 -1
  20. package/dist/exp/index.esm2017.js +0 -15139
  21. package/dist/exp/index.esm2017.js.map +0 -1
  22. package/dist/exp/index.node.cjs.js +0 -15746
  23. package/dist/exp/index.node.cjs.js.map +0 -1
  24. package/dist/exp/index.node.d.ts +0 -83
  25. package/dist/exp/src/api/DataSnapshot.d.ts +0 -99
  26. package/dist/exp/src/api/Database.d.ts +0 -87
  27. package/dist/exp/src/api/Query.d.ts +0 -193
  28. package/dist/exp/src/api/Reference.d.ts +0 -106
  29. package/dist/exp/src/api/TransactionResult.d.ts +0 -30
  30. package/dist/exp/src/api/internal.d.ts +0 -55
  31. package/dist/exp/src/api/onDisconnect.d.ts +0 -60
  32. package/dist/exp/src/api/test_access.d.ts +0 -42
  33. package/dist/exp/src/core/AuthTokenProvider.d.ts +0 -50
  34. package/dist/exp/src/core/CompoundWrite.d.ts +0 -77
  35. package/dist/exp/src/core/PersistentConnection.d.ts +0 -148
  36. package/dist/exp/src/core/ReadonlyRestClient.d.ts +0 -73
  37. package/dist/exp/src/core/Repo.d.ts +0 -121
  38. package/dist/exp/src/core/RepoInfo.d.ts +0 -59
  39. package/dist/exp/src/core/RepoManager.d.ts +0 -78
  40. package/dist/exp/src/core/Repo_transaction.d.ts +0 -33
  41. package/dist/exp/src/core/ServerActions.d.ts +0 -85
  42. package/dist/exp/src/core/SnapshotHolder.d.ts +0 -28
  43. package/dist/exp/src/core/SparseSnapshotTree.d.ts +0 -61
  44. package/dist/exp/src/core/SyncPoint.d.ts +0 -84
  45. package/dist/exp/src/core/SyncTree.d.ts +0 -236
  46. package/dist/exp/src/core/WriteTree.d.ts +0 -295
  47. package/dist/exp/src/core/operation/AckUserWrite.d.ts +0 -42
  48. package/dist/exp/src/core/operation/ListenComplete.d.ts +0 -32
  49. package/dist/exp/src/core/operation/Merge.d.ts +0 -46
  50. package/dist/exp/src/core/operation/Operation.d.ts +0 -78
  51. package/dist/exp/src/core/operation/Overwrite.d.ts +0 -35
  52. package/dist/exp/src/core/snap/ChildrenNode.d.ts +0 -180
  53. package/dist/exp/src/core/snap/IndexMap.d.ts +0 -43
  54. package/dist/exp/src/core/snap/LeafNode.d.ts +0 -107
  55. package/dist/exp/src/core/snap/Node.d.ts +0 -148
  56. package/dist/exp/src/core/snap/childSet.d.ts +0 -34
  57. package/dist/exp/src/core/snap/comparators.d.ts +0 -19
  58. package/dist/exp/src/core/snap/indexes/Index.d.ts +0 -69
  59. package/dist/exp/src/core/snap/indexes/KeyIndex.d.ts +0 -54
  60. package/dist/exp/src/core/snap/indexes/PathIndex.d.ts +0 -54
  61. package/dist/exp/src/core/snap/indexes/PriorityIndex.d.ts +0 -58
  62. package/dist/exp/src/core/snap/indexes/ValueIndex.d.ts +0 -56
  63. package/dist/exp/src/core/snap/nodeFromJSON.d.ts +0 -25
  64. package/dist/exp/src/core/snap/snap.d.ts +0 -29
  65. package/dist/exp/src/core/stats/StatsCollection.d.ts +0 -28
  66. package/dist/exp/src/core/stats/StatsListener.d.ts +0 -31
  67. package/dist/exp/src/core/stats/StatsManager.d.ts +0 -24
  68. package/dist/exp/src/core/stats/StatsReporter.d.ts +0 -33
  69. package/dist/exp/src/core/storage/DOMStorageWrapper.d.ts +0 -55
  70. package/dist/exp/src/core/storage/MemoryStorage.d.ts +0 -29
  71. package/dist/exp/src/core/storage/storage.d.ts +0 -22
  72. package/dist/exp/src/core/util/EventEmitter.d.ts +0 -45
  73. package/dist/exp/src/core/util/ImmutableTree.d.ts +0 -157
  74. package/dist/exp/src/core/util/NextPushId.d.ts +0 -33
  75. package/dist/exp/src/core/util/OnlineMonitor.d.ts +0 -40
  76. package/dist/exp/src/core/util/Path.d.ts +0 -132
  77. package/dist/exp/src/core/util/ServerValues.d.ts +0 -66
  78. package/dist/exp/src/core/util/SortedMap.d.ts +0 -362
  79. package/dist/exp/src/core/util/Tree.d.ts +0 -134
  80. package/dist/exp/src/core/util/VisibilityMonitor.d.ts +0 -30
  81. package/dist/exp/src/core/util/libs/parser.d.ts +0 -37
  82. package/dist/exp/src/core/util/misc.d.ts +0 -19
  83. package/dist/exp/src/core/util/util.d.ts +0 -232
  84. package/dist/exp/src/core/util/validation.d.ts +0 -108
  85. package/dist/exp/src/core/version.d.ts +0 -19
  86. package/dist/exp/src/core/view/CacheNode.d.ts +0 -59
  87. package/dist/exp/src/core/view/Change.d.ts +0 -74
  88. package/dist/exp/src/core/view/ChildChangeAccumulator.d.ts +0 -22
  89. package/dist/exp/src/core/view/CompleteChildSource.d.ts +0 -91
  90. package/dist/exp/src/core/view/Event.d.ts +0 -102
  91. package/dist/exp/src/core/view/EventGenerator.d.ts +0 -77
  92. package/dist/exp/src/core/view/EventQueue.d.ts +0 -99
  93. package/dist/exp/src/core/view/EventRegistration.d.ts +0 -154
  94. package/dist/exp/src/core/view/QueryParams.d.ts +0 -176
  95. package/dist/exp/src/core/view/View.d.ts +0 -97
  96. package/dist/exp/src/core/view/ViewCache.d.ts +0 -70
  97. package/dist/exp/src/core/view/ViewProcessor.d.ts +0 -166
  98. package/dist/exp/src/core/view/filter/IndexedFilter.d.ts +0 -54
  99. package/dist/exp/src/core/view/filter/LimitedFilter.d.ts +0 -94
  100. package/dist/exp/src/core/view/filter/NodeFilter.d.ts +0 -75
  101. package/dist/exp/src/core/view/filter/RangedFilter.d.ts +0 -109
  102. package/dist/exp/src/exp/Database.d.ts +0 -95
  103. package/dist/exp/src/realtime/BrowserPollConnection.d.ts +0 -208
  104. package/dist/exp/src/realtime/Connection.d.ts +0 -119
  105. package/dist/exp/src/realtime/Constants.d.ts +0 -26
  106. package/dist/exp/src/realtime/Transport.d.ts +0 -62
  107. package/dist/exp/src/realtime/TransportManager.d.ts +0 -55
  108. package/dist/exp/src/realtime/WebSocketConnection.d.ts +0 -133
  109. package/dist/exp/src/realtime/polling/PacketReceiver.d.ts +0 -41
  110. package/dist/exp/test/browser/crawler_support.test.d.ts +0 -17
  111. package/dist/exp/test/compound_write.test.d.ts +0 -17
  112. package/dist/exp/test/connection.test.d.ts +0 -17
  113. package/dist/exp/test/database.test.d.ts +0 -17
  114. package/dist/exp/test/datasnapshot.test.d.ts +0 -17
  115. package/dist/exp/test/exp/integration.test.d.ts +0 -17
  116. package/dist/exp/test/helpers/EventAccumulator.d.ts +0 -34
  117. package/dist/exp/test/helpers/events.d.ts +0 -37
  118. package/dist/exp/test/helpers/util.d.ts +0 -50
  119. package/dist/exp/test/info.test.d.ts +0 -17
  120. package/dist/exp/test/node.test.d.ts +0 -17
  121. package/dist/exp/test/order.test.d.ts +0 -17
  122. package/dist/exp/test/order_by.test.d.ts +0 -17
  123. package/dist/exp/test/path.test.d.ts +0 -17
  124. package/dist/exp/test/promise.test.d.ts +0 -17
  125. package/dist/exp/test/pushid.test.d.ts +0 -17
  126. package/dist/exp/test/query.test.d.ts +0 -17
  127. package/dist/exp/test/repoinfo.test.d.ts +0 -17
  128. package/dist/exp/test/servervalues.test.d.ts +0 -17
  129. package/dist/exp/test/sortedmap.test.d.ts +0 -17
  130. package/dist/exp/test/sparsesnapshottree.test.d.ts +0 -17
  131. package/dist/exp/test/transaction.test.d.ts +0 -17
  132. package/dist/src/exp/Database.d.ts +0 -95
  133. package/dist/test/exp/integration.test.d.ts +0 -17
  134. package/dist/test/pushid.test.d.ts +0 -17
@@ -1,176 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { NodeFilter } from './filter/NodeFilter';
18
- import { Index } from '../snap/indexes/Index';
19
- /**
20
- * This class is an immutable-from-the-public-api struct containing a set of query parameters defining a
21
- * range to be returned for a particular location. It is assumed that validation of parameters is done at the
22
- * user-facing API level, so it is not done here.
23
- * @constructor
24
- */
25
- export declare class QueryParams {
26
- private limitSet_;
27
- private startSet_;
28
- private startNameSet_;
29
- private startAfterSet_;
30
- private endSet_;
31
- private endNameSet_;
32
- private endBeforeSet_;
33
- private limit_;
34
- private viewFrom_;
35
- private indexStartValue_;
36
- private indexStartName_;
37
- private indexEndValue_;
38
- private indexEndName_;
39
- private index_;
40
- /**
41
- * Wire Protocol Constants
42
- * @const
43
- * @enum {string}
44
- * @private
45
- */
46
- private static readonly WIRE_PROTOCOL_CONSTANTS_;
47
- /**
48
- * REST Query Constants
49
- * @const
50
- * @enum {string}
51
- * @private
52
- */
53
- private static readonly REST_QUERY_CONSTANTS_;
54
- /**
55
- * Default, empty query parameters
56
- * @type {!QueryParams}
57
- * @const
58
- */
59
- static readonly DEFAULT: QueryParams;
60
- /**
61
- * @return {boolean}
62
- */
63
- hasStart(): boolean;
64
- hasStartAfter(): boolean;
65
- hasEndBefore(): boolean;
66
- /**
67
- * @return {boolean} True if it would return from left.
68
- */
69
- isViewFromLeft(): boolean;
70
- /**
71
- * Only valid to call if hasStart() returns true
72
- * @return {*}
73
- */
74
- getIndexStartValue(): unknown;
75
- /**
76
- * Only valid to call if hasStart() returns true.
77
- * Returns the starting key name for the range defined by these query parameters
78
- * @return {!string}
79
- */
80
- getIndexStartName(): string;
81
- /**
82
- * @return {boolean}
83
- */
84
- hasEnd(): boolean;
85
- /**
86
- * Only valid to call if hasEnd() returns true.
87
- * @return {*}
88
- */
89
- getIndexEndValue(): unknown;
90
- /**
91
- * Only valid to call if hasEnd() returns true.
92
- * Returns the end key name for the range defined by these query parameters
93
- * @return {!string}
94
- */
95
- getIndexEndName(): string;
96
- /**
97
- * @return {boolean}
98
- */
99
- hasLimit(): boolean;
100
- /**
101
- * @return {boolean} True if a limit has been set and it has been explicitly anchored
102
- */
103
- hasAnchoredLimit(): boolean;
104
- /**
105
- * Only valid to call if hasLimit() returns true
106
- * @return {!number}
107
- */
108
- getLimit(): number;
109
- /**
110
- * @return {!Index}
111
- */
112
- getIndex(): Index;
113
- /**
114
- * @return {!QueryParams}
115
- * @private
116
- */
117
- private copy_;
118
- /**
119
- * @param {!number} newLimit
120
- * @return {!QueryParams}
121
- */
122
- limit(newLimit: number): QueryParams;
123
- /**
124
- * @param {!number} newLimit
125
- * @return {!QueryParams}
126
- */
127
- limitToFirst(newLimit: number): QueryParams;
128
- /**
129
- * @param {!number} newLimit
130
- * @return {!QueryParams}
131
- */
132
- limitToLast(newLimit: number): QueryParams;
133
- /**
134
- * @param {*} indexValue
135
- * @param {?string=} key
136
- * @return {!QueryParams}
137
- */
138
- startAt(indexValue: unknown, key?: string | null): QueryParams;
139
- startAfter(indexValue: unknown, key?: string | null): QueryParams;
140
- /**
141
- * @param {*} indexValue
142
- * @param {?string=} key
143
- * @return {!QueryParams}
144
- */
145
- endAt(indexValue: unknown, key?: string | null): QueryParams;
146
- endBefore(indexValue: unknown, key?: string | null): QueryParams;
147
- /**
148
- * @param {!Index} index
149
- * @return {!QueryParams}
150
- */
151
- orderBy(index: Index): QueryParams;
152
- /**
153
- * @return {!Object}
154
- */
155
- getQueryObject(): {};
156
- /**
157
- * @return {boolean}
158
- */
159
- loadsAllData(): boolean;
160
- /**
161
- * @return {boolean}
162
- */
163
- isDefault(): boolean;
164
- /**
165
- * @return {!NodeFilter}
166
- */
167
- getNodeFilter(): NodeFilter;
168
- /**
169
- * Returns a set of REST query string parameters representing this query.
170
- *
171
- * @return {!Object.<string,*>} query string parameters
172
- */
173
- toRestQueryStringParameters(): {
174
- [k: string]: string | number;
175
- };
176
- }
@@ -1,97 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { ViewCache } from './ViewCache';
18
- import { Operation } from '../operation/Operation';
19
- import { Change } from './Change';
20
- import { Query } from '../../api/Query';
21
- import { EventRegistration } from './EventRegistration';
22
- import { Node } from '../snap/Node';
23
- import { Path } from '../util/Path';
24
- import { WriteTreeRef } from '../WriteTree';
25
- import { Event } from './Event';
26
- /**
27
- * A view represents a specific location and query that has 1 or more event registrations.
28
- *
29
- * It does several things:
30
- * - Maintains the list of event registrations for this location/query.
31
- * - Maintains a cache of the data visible for this location/query.
32
- * - Applies new operations (via applyOperation), updates the cache, and based on the event
33
- * registrations returns the set of events to be raised.
34
- * @constructor
35
- */
36
- export declare class View {
37
- private query_;
38
- private processor_;
39
- private viewCache_;
40
- private eventRegistrations_;
41
- private eventGenerator_;
42
- /**
43
- *
44
- * @param {!Query} query_
45
- * @param {!ViewCache} initialViewCache
46
- */
47
- constructor(query_: Query, initialViewCache: ViewCache);
48
- /**
49
- * @return {!Query}
50
- */
51
- getQuery(): Query;
52
- /**
53
- * @return {?Node}
54
- */
55
- getServerCache(): Node | null;
56
- /**
57
- * @param {!Path} path
58
- * @return {?Node}
59
- */
60
- getCompleteServerCache(path: Path): Node | null;
61
- /**
62
- * @return {boolean}
63
- */
64
- isEmpty(): boolean;
65
- /**
66
- * @param {!EventRegistration} eventRegistration
67
- */
68
- addEventRegistration(eventRegistration: EventRegistration): void;
69
- /**
70
- * @param {?EventRegistration} eventRegistration If null, remove all callbacks.
71
- * @param {Error=} cancelError If a cancelError is provided, appropriate cancel events will be returned.
72
- * @return {!Array.<!Event>} Cancel events, if cancelError was provided.
73
- */
74
- removeEventRegistration(eventRegistration: EventRegistration | null, cancelError?: Error): Event[];
75
- /**
76
- * Applies the given Operation, updates our cache, and returns the appropriate events.
77
- *
78
- * @param {!Operation} operation
79
- * @param {!WriteTreeRef} writesCache
80
- * @param {?Node} completeServerCache
81
- * @return {!Array.<!Event>}
82
- */
83
- applyOperation(operation: Operation, writesCache: WriteTreeRef, completeServerCache: Node | null): Event[];
84
- /**
85
- * @param {!EventRegistration} registration
86
- * @return {!Array.<!Event>}
87
- */
88
- getInitialEvents(registration: EventRegistration): Event[];
89
- /**
90
- * @private
91
- * @param {!Array.<!Change>} changes
92
- * @param {!Node} eventCache
93
- * @param {EventRegistration=} eventRegistration
94
- * @return {!Array.<!Event>}
95
- */
96
- generateEventsForChanges_(changes: Change[], eventCache: Node, eventRegistration?: EventRegistration): Event[];
97
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { CacheNode } from './CacheNode';
18
- import { Node } from '../snap/Node';
19
- /**
20
- * Stores the data we have cached for a view.
21
- *
22
- * serverSnap is the cached server data, eventSnap is the cached event data (server data plus any local writes).
23
- *
24
- * @constructor
25
- */
26
- export declare class ViewCache {
27
- private readonly eventCache_;
28
- private readonly serverCache_;
29
- /**
30
- *
31
- * @param {!CacheNode} eventCache_
32
- * @param {!CacheNode} serverCache_
33
- */
34
- constructor(eventCache_: CacheNode, serverCache_: CacheNode);
35
- /**
36
- * @const
37
- * @type {ViewCache}
38
- */
39
- static Empty: ViewCache;
40
- /**
41
- * @param {!Node} eventSnap
42
- * @param {boolean} complete
43
- * @param {boolean} filtered
44
- * @return {!ViewCache}
45
- */
46
- updateEventSnap(eventSnap: Node, complete: boolean, filtered: boolean): ViewCache;
47
- /**
48
- * @param {!Node} serverSnap
49
- * @param {boolean} complete
50
- * @param {boolean} filtered
51
- * @return {!ViewCache}
52
- */
53
- updateServerSnap(serverSnap: Node, complete: boolean, filtered: boolean): ViewCache;
54
- /**
55
- * @return {!CacheNode}
56
- */
57
- getEventCache(): CacheNode;
58
- /**
59
- * @return {?Node}
60
- */
61
- getCompleteEventSnap(): Node | null;
62
- /**
63
- * @return {!CacheNode}
64
- */
65
- getServerCache(): CacheNode;
66
- /**
67
- * @return {?Node}
68
- */
69
- getCompleteServerSnap(): Node | null;
70
- }
@@ -1,166 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Operation } from '../operation/Operation';
18
- import { ChildChangeAccumulator } from './ChildChangeAccumulator';
19
- import { Change } from './Change';
20
- import { Path } from '../util/Path';
21
- import { ViewCache } from './ViewCache';
22
- import { NodeFilter } from './filter/NodeFilter';
23
- import { WriteTreeRef } from '../WriteTree';
24
- import { Node } from '../snap/Node';
25
- /**
26
- * @constructor
27
- * @struct
28
- */
29
- export declare class ProcessorResult {
30
- readonly viewCache: ViewCache;
31
- readonly changes: Change[];
32
- /**
33
- * @param {!ViewCache} viewCache
34
- * @param {!Array.<!Change>} changes
35
- */
36
- constructor(viewCache: ViewCache, changes: Change[]);
37
- }
38
- /**
39
- * @constructor
40
- */
41
- export declare class ViewProcessor {
42
- private readonly filter_;
43
- /**
44
- * @param {!NodeFilter} filter_
45
- */
46
- constructor(filter_: NodeFilter);
47
- /**
48
- * @param {!ViewCache} viewCache
49
- */
50
- assertIndexed(viewCache: ViewCache): void;
51
- /**
52
- * @param {!ViewCache} oldViewCache
53
- * @param {!Operation} operation
54
- * @param {!WriteTreeRef} writesCache
55
- * @param {?Node} completeCache
56
- * @return {!ProcessorResult}
57
- */
58
- applyOperation(oldViewCache: ViewCache, operation: Operation, writesCache: WriteTreeRef, completeCache: Node | null): ProcessorResult;
59
- /**
60
- * @param {!ViewCache} oldViewCache
61
- * @param {!ViewCache} newViewCache
62
- * @param {!Array.<!Change>} accumulator
63
- * @private
64
- */
65
- private static maybeAddValueEvent_;
66
- /**
67
- * @param {!ViewCache} viewCache
68
- * @param {!Path} changePath
69
- * @param {!WriteTreeRef} writesCache
70
- * @param {!CompleteChildSource} source
71
- * @param {!ChildChangeAccumulator} accumulator
72
- * @return {!ViewCache}
73
- * @private
74
- */
75
- private generateEventCacheAfterServerEvent_;
76
- /**
77
- * @param {!ViewCache} oldViewCache
78
- * @param {!Path} changePath
79
- * @param {!Node} changedSnap
80
- * @param {!WriteTreeRef} writesCache
81
- * @param {?Node} completeCache
82
- * @param {boolean} filterServerNode
83
- * @param {!ChildChangeAccumulator} accumulator
84
- * @return {!ViewCache}
85
- * @private
86
- */
87
- applyServerOverwrite_(oldViewCache: ViewCache, changePath: Path, changedSnap: Node, writesCache: WriteTreeRef, completeCache: Node | null, filterServerNode: boolean, accumulator: ChildChangeAccumulator): ViewCache;
88
- /**
89
- * @param {!ViewCache} oldViewCache
90
- * @param {!Path} changePath
91
- * @param {!Node} changedSnap
92
- * @param {!WriteTreeRef} writesCache
93
- * @param {?Node} completeCache
94
- * @param {!ChildChangeAccumulator} accumulator
95
- * @return {!ViewCache}
96
- * @private
97
- */
98
- applyUserOverwrite_(oldViewCache: ViewCache, changePath: Path, changedSnap: Node, writesCache: WriteTreeRef, completeCache: Node | null, accumulator: ChildChangeAccumulator): ViewCache;
99
- /**
100
- * @param {!ViewCache} viewCache
101
- * @param {string} childKey
102
- * @return {boolean}
103
- * @private
104
- */
105
- private static cacheHasChild_;
106
- /**
107
- * @param {!ViewCache} viewCache
108
- * @param {!Path} path
109
- * @param {ImmutableTree.<!Node>} changedChildren
110
- * @param {!WriteTreeRef} writesCache
111
- * @param {?Node} serverCache
112
- * @param {!ChildChangeAccumulator} accumulator
113
- * @return {!ViewCache}
114
- * @private
115
- */
116
- private applyUserMerge_;
117
- /**
118
- * @param {!Node} node
119
- * @param {ImmutableTree.<!Node>} merge
120
- * @return {!Node}
121
- * @private
122
- */
123
- private applyMerge_;
124
- /**
125
- * @param {!ViewCache} viewCache
126
- * @param {!Path} path
127
- * @param {!ImmutableTree.<!Node>} changedChildren
128
- * @param {!WriteTreeRef} writesCache
129
- * @param {?Node} serverCache
130
- * @param {boolean} filterServerNode
131
- * @param {!ChildChangeAccumulator} accumulator
132
- * @return {!ViewCache}
133
- * @private
134
- */
135
- private applyServerMerge_;
136
- /**
137
- * @param {!ViewCache} viewCache
138
- * @param {!Path} ackPath
139
- * @param {!ImmutableTree<!boolean>} affectedTree
140
- * @param {!WriteTreeRef} writesCache
141
- * @param {?Node} completeCache
142
- * @param {!ChildChangeAccumulator} accumulator
143
- * @return {!ViewCache}
144
- * @private
145
- */
146
- private ackUserWrite_;
147
- /**
148
- * @param {!ViewCache} viewCache
149
- * @param {!Path} path
150
- * @param {!WriteTreeRef} writesCache
151
- * @param {!ChildChangeAccumulator} accumulator
152
- * @return {!ViewCache}
153
- * @private
154
- */
155
- private listenComplete_;
156
- /**
157
- * @param {!ViewCache} viewCache
158
- * @param {!Path} path
159
- * @param {!WriteTreeRef} writesCache
160
- * @param {?Node} completeServerCache
161
- * @param {!ChildChangeAccumulator} accumulator
162
- * @return {!ViewCache}
163
- * @private
164
- */
165
- private revertUserWrite_;
166
- }
@@ -1,54 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { NodeFilter } from './NodeFilter';
18
- import { Index } from '../../snap/indexes/Index';
19
- import { Path } from '../../util/Path';
20
- import { CompleteChildSource } from '../CompleteChildSource';
21
- import { ChildChangeAccumulator } from '../ChildChangeAccumulator';
22
- import { Node } from '../../snap/Node';
23
- /**
24
- * Doesn't really filter nodes but applies an index to the node and keeps track of any changes
25
- *
26
- * @constructor
27
- * @implements {NodeFilter}
28
- * @param {!Index} index
29
- */
30
- export declare class IndexedFilter implements NodeFilter {
31
- private readonly index_;
32
- constructor(index_: Index);
33
- updateChild(snap: Node, key: string, newChild: Node, affectedPath: Path, source: CompleteChildSource, optChangeAccumulator: ChildChangeAccumulator | null): Node;
34
- /**
35
- * @inheritDoc
36
- */
37
- updateFullNode(oldSnap: Node, newSnap: Node, optChangeAccumulator: ChildChangeAccumulator | null): Node;
38
- /**
39
- * @inheritDoc
40
- */
41
- updatePriority(oldSnap: Node, newPriority: Node): Node;
42
- /**
43
- * @inheritDoc
44
- */
45
- filtersNodes(): boolean;
46
- /**
47
- * @inheritDoc
48
- */
49
- getIndexedFilter(): IndexedFilter;
50
- /**
51
- * @inheritDoc
52
- */
53
- getIndex(): Index;
54
- }
@@ -1,94 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- import { Node } from '../../snap/Node';
18
- import { NodeFilter } from './NodeFilter';
19
- import { Index } from '../../snap/indexes/Index';
20
- import { IndexedFilter } from './IndexedFilter';
21
- import { QueryParams } from '../QueryParams';
22
- import { Path } from '../../util/Path';
23
- import { CompleteChildSource } from '../CompleteChildSource';
24
- import { ChildChangeAccumulator } from '../ChildChangeAccumulator';
25
- /**
26
- * Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible
27
- *
28
- * @constructor
29
- * @implements {NodeFilter}
30
- */
31
- export declare class LimitedFilter implements NodeFilter {
32
- /**
33
- * @const
34
- * @type {RangedFilter}
35
- * @private
36
- */
37
- private readonly rangedFilter_;
38
- /**
39
- * @const
40
- * @type {!Index}
41
- * @private
42
- */
43
- private readonly index_;
44
- /**
45
- * @const
46
- * @type {number}
47
- * @private
48
- */
49
- private readonly limit_;
50
- /**
51
- * @const
52
- * @type {boolean}
53
- * @private
54
- */
55
- private readonly reverse_;
56
- /**
57
- * @param {!QueryParams} params
58
- */
59
- constructor(params: QueryParams);
60
- /**
61
- * @inheritDoc
62
- */
63
- updateChild(snap: Node, key: string, newChild: Node, affectedPath: Path, source: CompleteChildSource, optChangeAccumulator: ChildChangeAccumulator | null): Node;
64
- /**
65
- * @inheritDoc
66
- */
67
- updateFullNode(oldSnap: Node, newSnap: Node, optChangeAccumulator: ChildChangeAccumulator | null): Node;
68
- /**
69
- * @inheritDoc
70
- */
71
- updatePriority(oldSnap: Node, newPriority: Node): Node;
72
- /**
73
- * @inheritDoc
74
- */
75
- filtersNodes(): boolean;
76
- /**
77
- * @inheritDoc
78
- */
79
- getIndexedFilter(): IndexedFilter;
80
- /**
81
- * @inheritDoc
82
- */
83
- getIndex(): Index;
84
- /**
85
- * @param {!Node} snap
86
- * @param {string} childKey
87
- * @param {!Node} childSnap
88
- * @param {!CompleteChildSource} source
89
- * @param {?ChildChangeAccumulator} changeAccumulator
90
- * @return {!Node}
91
- * @private
92
- */
93
- private fullLimitUpdateChild_;
94
- }