File tree 4 files changed +9
-17
lines changed
4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -284,13 +284,6 @@ export function repoStart(repo: Repo): void {
284
284
} ) ;
285
285
}
286
286
287
- /**
288
- * @return The namespace represented by the repo.
289
- */
290
- export function repoName ( repo : Repo ) : string {
291
- return repo . repoInfo_ . namespace ;
292
- }
293
-
294
287
/**
295
288
* @return The time in milliseconds, taking the server offset into account if we have one.
296
289
*/
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import { QueryParams } from '../QueryParams';
31
31
import { Path } from '../../util/Path' ;
32
32
import { CompleteChildSource } from '../CompleteChildSource' ;
33
33
import { ChildChangeAccumulator } from '../ChildChangeAccumulator' ;
34
- import { repoName } from '../../Repo' ;
35
34
36
35
/**
37
36
* Applies a limit and a range to a node and uses RangedFilter to do the heavy lifting where possible
@@ -135,7 +134,7 @@ export class LimitedFilter implements NodeFilter {
135
134
this . index_ . compare ( next , this . rangedFilter_ . getEndPost ( ) ) <= 0 ;
136
135
}
137
136
if ( inRange ) {
138
- filtered = filtered . updateImmediateChild ( repoName ( next ) , next . node ) ;
137
+ filtered = filtered . updateImmediateChild ( next . name , next . node ) ;
139
138
count ++ ;
140
139
} else {
141
140
// if we have reached the end post, we cannot keep adding elemments
@@ -180,7 +179,7 @@ export class LimitedFilter implements NodeFilter {
180
179
count ++ ;
181
180
} else {
182
181
filtered = filtered . updateImmediateChild (
183
- repoName ( next ) ,
182
+ next . name ,
184
183
ChildrenNode . EMPTY_NODE
185
184
) ;
186
185
}
Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ describe('.info Tests', function () {
161
161
} ) ;
162
162
163
163
runs ( ( ) => {
164
- repoGetDatabase ( ref ) . goOffline ( ) ;
165
- repoGetDatabase ( refAlt ) . goOffline ( ) ;
164
+ ref . database . goOffline ( ) ;
165
+ refAlt . database . goOffline ( ) ;
166
166
} ) ;
167
167
168
168
// Ensure we're disconnected from both Firebases
@@ -182,7 +182,7 @@ describe('.info Tests', function () {
182
182
// Ensure that we don't automatically reconnect upon Reference creation
183
183
runs ( ( ) => {
184
184
ready = 0 ;
185
- const refDup = repoGetDatabase ( ref ) . ref ( ) ;
185
+ const refDup = ref . database . ref ( ) ;
186
186
refDup . child ( '.info/connected' ) . on ( 'value' , snap => {
187
187
ready = snap . val ( ) === true || ready ;
188
188
} ) ;
@@ -197,8 +197,8 @@ describe('.info Tests', function () {
197
197
} ) ;
198
198
199
199
runs ( ( ) => {
200
- repoGetDatabase ( ref ) . goOnline ( ) ;
201
- repoGetDatabase ( refAlt ) . goOnline ( ) ;
200
+ ref . database . goOnline ( ) ;
201
+ refAlt . database . goOnline ( ) ;
202
202
} ) ;
203
203
204
204
// Ensure we're connected to both Firebases
Original file line number Diff line number Diff line change @@ -4527,12 +4527,12 @@ describe('Query Tests', () => {
4527
4527
4528
4528
expect ( readSnapshot . val ( ) ) . to . deep . equal ( { a : 1 , b : 2 , c : 3 } ) ;
4529
4529
4530
- repoGetDatabase ( queryRef ) . goOffline ( ) ;
4530
+ queryRef . database . goOffline ( ) ;
4531
4531
4532
4532
// Delete an item in the query and then bring our connection back up.
4533
4533
ea . reset ( ) ;
4534
4534
await writerRef . child ( 'b' ) . remove ( ) ;
4535
- repoGetDatabase ( queryRef ) . goOnline ( ) ;
4535
+ queryRef . database . goOnline ( ) ;
4536
4536
4537
4537
await ea . promise ;
4538
4538
expect ( readSnapshot . child ( 'b' ) . val ( ) ) . to . be . null ;
You can’t perform that action at this time.
0 commit comments