File tree Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Expand file tree Collapse file tree 5 files changed +17
-10
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ import {
8181} from './indexeddb_schema' ;
8282import { DbDocumentOverlayKey , DbTimestampKey } from './indexeddb_sentinels' ;
8383import { 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. */
8787export class LocalSerializer {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { SnapshotVersion } from '../core/snapshot_version';
1919import { Target } from '../core/target' ;
2020import { ListenSequenceNumber , TargetId } from '../core/types' ;
2121import { 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. */
2525export const enum TargetPurpose {
Original file line number Diff line number Diff 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
121121const 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
You can’t perform that action at this time.
0 commit comments