Skip to content

Commit 5e6cd52

Browse files
committed
Proto update sync and add query spec tests back
1 parent 0212394 commit 5e6cd52

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

packages/firestore/src/local/local_serializer.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ export function toDbTarget(
331331
function isPipelineQueryTarget(
332332
dbQuery: DbQuery
333333
): dbQuery is PublicPipelineQueryTarget {
334-
return (dbQuery as PublicPipelineQueryTarget).pipeline !== undefined;
334+
return (
335+
(dbQuery as PublicPipelineQueryTarget).structuredPipeline !== undefined
336+
);
335337
}
336338

337339
/**

packages/firestore/src/protos/firestore_proto_api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
357357
structuredQuery?: StructuredQuery;
358358
}
359359
interface PipelineQueryTarget {
360-
pipeline?: StructuredPipeline;
360+
structuredPipeline?: StructuredPipeline;
361361
}
362362
interface ReadOnly {
363363
readTime?: string;

packages/firestore/src/protos/google/firestore/v1/firestore.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ message Target {
918918
// The pipeline to run.
919919
oneof pipeline_type {
920920
// A pipelined operation in structured format.
921-
StructuredPipeline pipeline = 1;
921+
StructuredPipeline structured_pipeline = 1;
922922
}
923923
}
924924

packages/firestore/src/protos/protos.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2421,12 +2421,12 @@
24212421
"oneofs": {
24222422
"pipelineType": {
24232423
"oneof": [
2424-
"pipeline"
2424+
"structuredPipeline"
24252425
]
24262426
}
24272427
},
24282428
"fields": {
2429-
"pipeline": {
2429+
"structuredPipeline": {
24302430
"type": "StructuredPipeline",
24312431
"id": 1
24322432
}

packages/firestore/src/remote/serializer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ export function fromPipelineTarget(
10981098
target: ProtoPipelineQueryTarget,
10991099
serializer: JsonProtoSerializer
11001100
): CorePipeline {
1101-
const pipeline = target.pipeline;
1101+
const pipeline = target.structuredPipeline;
11021102
hardAssert(
11031103
(pipeline?.pipeline?.stages ?? []).length > 0,
11041104
'Deserializing pipeline without any stages.'
@@ -1114,7 +1114,7 @@ export function toPipelineTarget(
11141114
target: CorePipeline
11151115
): ProtoPipelineQueryTarget {
11161116
return {
1117-
pipeline: {
1117+
structuredPipeline: {
11181118
pipeline: {
11191119
stages: target.stages.map(s => s._toProto(serializer))
11201120
}

packages/firestore/test/unit/specs/describe_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function specTest(
187187
? [true, false]
188188
: [false];
189189
for (const usePersistence of persistenceModes) {
190-
const convertToPipelines = [true];
190+
const convertToPipelines = [false, true];
191191
for (const convertToPipeline of convertToPipelines) {
192192
const runner = getTestRunner(tags, usePersistence, convertToPipeline);
193193
const timeout = getTestTimeout(tags);

0 commit comments

Comments
 (0)