Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 57aaf39

Browse files
feat: Add support for the VectorValue type (#6154)
1 parent 8c04ec2 commit 57aaf39

File tree

18 files changed

+897
-57
lines changed

18 files changed

+897
-57
lines changed

firebase-firestore/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [feature] Add support for the VectorValue type. [#6154](//github.com/firebase/firebase-android-sdk/pull/6154)
33

44
# 25.0.0
55
* [feature] Enable queries with range & inequality filters on multiple fields. [#5729](//github.com/firebase/firebase-android-sdk/pull/5729)

firebase-firestore/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ it on behalf.
113113

114114
Run below to format Java code:
115115
```bash
116-
./gradlew :firebase-firestore:googleJavaFormat
116+
./gradlew :firebase-firestore:spotlessApply
117117
```
118118

119119
See [here](../README.md#code-formatting) if you want to be able to format code

firebase-firestore/api.txt

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ package com.google.firebase.firestore {
123123
method @Nullable public String getString(@NonNull String);
124124
method @Nullable public com.google.firebase.Timestamp getTimestamp(@NonNull String);
125125
method @Nullable public com.google.firebase.Timestamp getTimestamp(@NonNull String, @NonNull com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior);
126+
method @Nullable public com.google.firebase.firestore.VectorValue getVectorValue(@NonNull String);
126127
method @Nullable public <T> T toObject(@NonNull Class<T>);
127128
method @Nullable public <T> T toObject(@NonNull Class<T>, @NonNull com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior);
128129
}
@@ -152,6 +153,7 @@ package com.google.firebase.firestore {
152153
method @NonNull public static com.google.firebase.firestore.FieldValue increment(long);
153154
method @NonNull public static com.google.firebase.firestore.FieldValue increment(double);
154155
method @NonNull public static com.google.firebase.firestore.FieldValue serverTimestamp();
156+
method @NonNull public static com.google.firebase.firestore.VectorValue vector(@NonNull double[]);
155157
}
156158

157159
public class Filter {
@@ -554,6 +556,10 @@ package com.google.firebase.firestore {
554556
method @NonNull public com.google.firebase.firestore.TransactionOptions.Builder setMaxAttempts(int);
555557
}
556558

559+
public class VectorValue {
560+
method @NonNull public double[] toArray();
561+
}
562+
557563
public class WriteBatch {
558564
method @NonNull public com.google.android.gms.tasks.Task<java.lang.Void> commit();
559565
method @NonNull public com.google.firebase.firestore.WriteBatch delete(@NonNull com.google.firebase.firestore.DocumentReference);

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/NumericTransformsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
@RunWith(AndroidJUnit4.class)
3636
public class NumericTransformsTest {
37-
private static final double DOUBLE_EPSILON = 0.000001;
37+
public static final double DOUBLE_EPSILON = 0.000001;
3838

3939
// A document reference to read and write to.
4040
private DocumentReference docRef;

0 commit comments

Comments
 (0)