Skip to content

Commit 5e8f7f0

Browse files
committed
Spotless
1 parent b2f0b3f commit 5e8f7f0

File tree

4 files changed

+40
-11
lines changed

4 files changed

+40
-11
lines changed

firebase-firestore/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [feature] Pipelines
33

44
# 25.1.2
55
* [fixed] Fixed a server and sdk mismatch in unicode string sorting. [#6615](//github.com/firebase/firebase-android-sdk/pull/6615)

firebase-firestore/api.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ package com.google.firebase.firestore {
430430
method public com.google.android.gms.tasks.Task<com.google.firebase.firestore.PipelineSnapshot> execute();
431431
method public com.google.firebase.firestore.Pipeline findNearest(com.google.firebase.firestore.pipeline.Expr property, double[] vector, com.google.firebase.firestore.pipeline.FindNearestStage.DistanceMeasure distanceMeasure);
432432
method public com.google.firebase.firestore.Pipeline findNearest(com.google.firebase.firestore.pipeline.Expr property, double[] vector, com.google.firebase.firestore.pipeline.FindNearestStage.DistanceMeasure distanceMeasure, com.google.firebase.firestore.pipeline.FindNearestOptions options);
433-
method public com.google.firebase.firestore.Pipeline genericStage(String name, java.lang.Object... params);
433+
method public com.google.firebase.firestore.Pipeline genericStage(com.google.firebase.firestore.pipeline.GenericStage stage);
434+
method public com.google.firebase.firestore.Pipeline genericStage(String name, java.lang.Object... arguments);
434435
method public com.google.firebase.firestore.Pipeline limit(long limit);
435436
method public com.google.firebase.firestore.Pipeline offset(long offset);
436437
method public com.google.firebase.firestore.Pipeline removeFields(com.google.firebase.firestore.pipeline.Field... fields);
@@ -1259,6 +1260,25 @@ package com.google.firebase.firestore.pipeline {
12591260
method public com.google.firebase.firestore.pipeline.BooleanExpr xor(com.google.firebase.firestore.pipeline.BooleanExpr condition, com.google.firebase.firestore.pipeline.BooleanExpr... conditions);
12601261
}
12611262

1263+
public final class GenericOptions extends com.google.firebase.firestore.pipeline.AbstractOptions<com.google.firebase.firestore.pipeline.GenericOptions> {
1264+
field public static final com.google.firebase.firestore.pipeline.GenericOptions.Companion Companion;
1265+
field public static final com.google.firebase.firestore.pipeline.GenericOptions DEFAULT;
1266+
}
1267+
1268+
public static final class GenericOptions.Companion {
1269+
}
1270+
1271+
public final class GenericStage extends com.google.firebase.firestore.pipeline.Stage {
1272+
method public static com.google.firebase.firestore.pipeline.GenericStage of(String name);
1273+
method public com.google.firebase.firestore.pipeline.GenericStage withArguments(java.lang.Object... arguments);
1274+
method public com.google.firebase.firestore.pipeline.GenericStage withOptions(com.google.firebase.firestore.pipeline.GenericOptions options);
1275+
field public static final com.google.firebase.firestore.pipeline.GenericStage.Companion Companion;
1276+
}
1277+
1278+
public static final class GenericStage.Companion {
1279+
method public com.google.firebase.firestore.pipeline.GenericStage of(String name);
1280+
}
1281+
12621282
public final class Ordering {
12631283
method public static com.google.firebase.firestore.pipeline.Ordering ascending(com.google.firebase.firestore.pipeline.Expr expr);
12641284
method public static com.google.firebase.firestore.pipeline.Ordering ascending(String fieldName);
@@ -1301,6 +1321,8 @@ package com.google.firebase.firestore.pipeline {
13011321
}
13021322

13031323
public abstract class Stage {
1324+
method protected final String getName();
1325+
property protected final String name;
13041326
}
13051327

13061328
public final class UnnestOptions extends com.google.firebase.firestore.pipeline.AbstractOptions<com.google.firebase.firestore.pipeline.UnnestOptions> {

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/testutil/IntegrationTestUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public enum TargetBackend {
9898

9999
// Set this to the desired enum value to change the target backend when running tests locally.
100100
// Note: DO NOT change this variable except for local testing.
101-
private static final TargetBackend backendForLocalTesting = null;
101+
private static final TargetBackend backendForLocalTesting = TargetBackend.NIGHTLY;
102102

103103
private static final TargetBackend backend = getTargetBackend();
104104
private static final String EMULATOR_HOST = "10.0.2.2";

firebase-firestore/src/main/java/com/google/firebase/firestore/pipeline/stage.kt

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,21 @@ private constructor(protected val name: String, private val options: InternalOpt
3636
}
3737

3838
class GenericStage
39-
private constructor(name: String, private val arguments: List<GenericArg>, private val options: GenericOptions) : Stage(name, options) {
40-
internal constructor(name: String, arguments: List<GenericArg>) : this(name, arguments, GenericOptions.DEFAULT)
39+
private constructor(
40+
name: String,
41+
private val arguments: List<GenericArg>,
42+
private val options: GenericOptions
43+
) : Stage(name, options) {
44+
internal constructor(
45+
name: String,
46+
arguments: List<GenericArg>
47+
) : this(name, arguments, GenericOptions.DEFAULT)
4148
companion object {
42-
@JvmStatic
43-
fun of(name: String) = GenericStage(name, emptyList())
49+
@JvmStatic fun of(name: String) = GenericStage(name, emptyList())
4450
}
4551

46-
fun withArguments(vararg arguments: Any): GenericStage = GenericStage(name, arguments.map(GenericArg::from), options)
52+
fun withArguments(vararg arguments: Any): GenericStage =
53+
GenericStage(name, arguments.map(GenericArg::from), options)
4754

4855
fun withOptions(options: GenericOptions): GenericStage = GenericStage(name, arguments, options)
4956

@@ -87,10 +94,10 @@ internal sealed class GenericArg {
8794
}
8895
}
8996

90-
class GenericOptions private constructor(options: InternalOptions) : AbstractOptions<GenericOptions>(options) {
97+
class GenericOptions private constructor(options: InternalOptions) :
98+
AbstractOptions<GenericOptions>(options) {
9199
companion object {
92-
@JvmField
93-
val DEFAULT = GenericOptions(InternalOptions.EMPTY)
100+
@JvmField val DEFAULT = GenericOptions(InternalOptions.EMPTY)
94101
}
95102
override fun self(options: InternalOptions) = GenericOptions(options)
96103
}

0 commit comments

Comments
 (0)