Skip to content

Commit 8ac835e

Browse files
committed
fix rebase error
1 parent 93fdb23 commit 8ac835e

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

packages/firestore/src/core/target.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
orderByEquals,
5353
stringifyOrderBy
5454
} from './order_by';
55-
import { Pipeline } from '../pipelines/api/pipeline';
55+
import { Pipeline } from '../api/pipeline';
5656

5757
/**
5858
* A Target represents the WatchTarget representation of a Query, which is used

packages/firestore/src/lite-api/pipeline.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -812,13 +812,20 @@ export class Pipeline<AppModelType = DocumentData> implements ProtoSerializable<
812812
* @private
813813
*/
814814
_toProto(jsonProtoSerializer: JsonProtoSerializer): ExecutePipelineRequest {
815-
const stages: ProtoStage[] = this.stages.map(stage =>
816-
stage._toProto(jsonProtoSerializer)
817-
);
818-
const structuredPipeline: StructuredPipeline = { pipeline: { stages } };
819815
return {
820816
database: getEncodedDatabaseId(jsonProtoSerializer),
821-
structuredPipeline
817+
structuredPipeline: this._toStructuredPipeline(jsonProtoSerializer)
822818
};
823819
}
820+
821+
/**
822+
* @internal
823+
* @private
824+
*/
825+
_toStructuredPipeline(jsonProtoSerializer: JsonProtoSerializer): StructuredPipeline {
826+
const stages: ProtoStage[] = this.stages.map(stage =>
827+
stage._toProto(jsonProtoSerializer)
828+
);
829+
return { pipeline: { stages } };
830+
}
824831
}

packages/firestore/src/local/local_serializer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import {
8181
} from './indexeddb_schema';
8282
import { DbDocumentOverlayKey, DbTimestampKey } from './indexeddb_sentinels';
8383
import { TargetData, TargetPurpose } from './target_data';
84-
import { Pipeline } from '../pipelines/api/pipeline';
84+
import { Pipeline } from '../api/pipeline';
8585

8686
/** Serializer for values stored in the LocalStore. */
8787
export class LocalSerializer {

packages/firestore/src/local/target_data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { SnapshotVersion } from '../core/snapshot_version';
1919
import { Target } from '../core/target';
2020
import { ListenSequenceNumber, TargetId } from '../core/types';
2121
import { ByteString } from '../util/byte_string';
22-
import { Pipeline } from '../pipelines/api/pipeline';
22+
import { Pipeline } from '../api/pipeline';
2323

2424
/** An enumeration of the different purposes we have for targets. */
2525
export const enum TargetPurpose {

packages/firestore/src/remote/serializer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ import {
116116
WatchTargetChange,
117117
WatchTargetChangeState
118118
} from './watch_change';
119-
import { Pipeline } from '../api';
119+
import { Pipeline } from '../api/pipeline';
120120

121121
const DIRECTIONS = (() => {
122122
const dirs: { [dir: string]: ProtoOrderDirection } = {};
@@ -1102,7 +1102,7 @@ export function toPipelineTarget(
11021102
target: Pipeline
11031103
): ProtoPipelineQueryTarget {
11041104
return {
1105-
pipeline: {}
1105+
pipeline: target._toStructuredPipeline(serializer)
11061106
};
11071107
}
11081108

0 commit comments

Comments
 (0)