Skip to content

Commit 462efdc

Browse files
committed
Free functions removed from exp database.ts
1 parent 8cb3c23 commit 462efdc

File tree

4 files changed

+2
-36
lines changed

4 files changed

+2
-36
lines changed

packages/firestore/exp/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export {
3131
waitForPendingWrites,
3232
disableNetwork,
3333
enableNetwork,
34-
namedQuery,
35-
loadBundle,
3634
terminate
3735
} from './src/api/database';
3836

packages/firestore/exp/src/api/database.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import {
2424
FirestoreClient,
2525
firestoreClientDisableNetwork,
2626
firestoreClientEnableNetwork,
27-
firestoreClientGetNamedQuery,
28-
firestoreClientLoadBundle,
2927
firestoreClientWaitForPendingWrites,
3028
setOfflineComponentProvider,
3129
setOnlineComponentProvider
@@ -55,8 +53,6 @@ import {
5553
indexedDbStoragePrefix
5654
} from '../../../src/local/indexeddb_persistence';
5755
import { PersistenceSettings } from '../../../exp-types';
58-
import { Query } from '../../../lite/src/api/reference';
59-
import { LoadBundleTask } from '../../../src/api/bundle';
6056

6157
/** DOMException error code constants. */
6258
const DOM_EXCEPTION_INVALID_STATE = 11;
@@ -435,29 +431,3 @@ function verifyNotInitialized(firestore: FirebaseFirestore): void {
435431
);
436432
}
437433
}
438-
439-
export function loadBundle(
440-
firestore: FirebaseFirestore,
441-
bundleData: ArrayBuffer | ReadableStream<Uint8Array> | string
442-
): LoadBundleTask {
443-
const client = ensureFirestoreConfigured(firestore);
444-
const resultTask = new LoadBundleTask();
445-
446-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
447-
firestoreClientLoadBundle(client, bundleData, resultTask);
448-
return resultTask;
449-
}
450-
451-
export function namedQuery(
452-
firestore: FirebaseFirestore,
453-
name: string
454-
): Promise<Query | null> {
455-
const client = ensureFirestoreConfigured(firestore);
456-
return firestoreClientGetNamedQuery(client, name).then(namedQuery => {
457-
if (!namedQuery) {
458-
return null;
459-
}
460-
461-
return new Query(firestore, null, namedQuery.query);
462-
});
463-
}

packages/firestore/exp/test/shim.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import {
3131
getDocs,
3232
getDocsFromCache,
3333
getDocsFromServer,
34-
loadBundle,
35-
namedQuery,
3634
onSnapshot,
3735
query,
3836
queryEqual,
@@ -57,7 +55,7 @@ import {
5755
validateSetOptions
5856
} from '../../src/util/input_validation';
5957
import { Compat } from '../../src/compat/compat';
60-
import { Firestore } from '../../src/api/database';
58+
import { Firestore, loadBundle, namedQuery } from '../../src/api/database';
6159

6260
export { GeoPoint, Timestamp } from '../index';
6361
export { loadBundle, namedQuery };

packages/firestore/test/integration/api/bundle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const BUNDLE_TEMPLATE = [
5959
'{"document":{"name":"projects/{0}/databases/(default)/documents/coll-1/b","createTime":{"seconds":1,"nanos":9},"updateTime":{"seconds":1,"nanos":9},"fields":{"k":{"stringValue":"b"},"bar":{"integerValue":2}}}}'
6060
];
6161

62-
apiDescribe.only('Bundles', (persistence: boolean) => {
62+
apiDescribe('Bundles', (persistence: boolean) => {
6363
function verifySnapEqualsTestDocs(snap: firestore.QuerySnapshot): void {
6464
expect(toDataArray(snap)).to.deep.equal([
6565
{ k: 'a', bar: 1 },

0 commit comments

Comments
 (0)