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

Skip to content

feat: Add support for the VectorValue type #6154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 8, 2024
2 changes: 1 addition & 1 deletion firebase-firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

* [feature] Add support for the VectorValue type. [#6154](//github.com/firebase/firebase-android-sdk/pull/6154)

# 25.0.0
* [feature] Enable queries with range & inequality filters on multiple fields. [#5729](//github.com/firebase/firebase-android-sdk/pull/5729)
Expand Down
2 changes: 1 addition & 1 deletion firebase-firestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ it on behalf.

Run below to format Java code:
```bash
./gradlew :firebase-firestore:googleJavaFormat
./gradlew :firebase-firestore:spotlessApply
```

See [here](../README.md#code-formatting) if you want to be able to format code
Expand Down
6 changes: 6 additions & 0 deletions firebase-firestore/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ package com.google.firebase.firestore {
method @Nullable public String getString(@NonNull String);
method @Nullable public com.google.firebase.Timestamp getTimestamp(@NonNull String);
method @Nullable public com.google.firebase.Timestamp getTimestamp(@NonNull String, @NonNull com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior);
method @Nullable public com.google.firebase.firestore.VectorValue getVectorValue(@NonNull String);
method @Nullable public <T> T toObject(@NonNull Class<T>);
method @Nullable public <T> T toObject(@NonNull Class<T>, @NonNull com.google.firebase.firestore.DocumentSnapshot.ServerTimestampBehavior);
}
Expand Down Expand Up @@ -152,6 +153,7 @@ package com.google.firebase.firestore {
method @NonNull public static com.google.firebase.firestore.FieldValue increment(long);
method @NonNull public static com.google.firebase.firestore.FieldValue increment(double);
method @NonNull public static com.google.firebase.firestore.FieldValue serverTimestamp();
method @NonNull public static com.google.firebase.firestore.VectorValue vector(@NonNull double[]);
}

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

public class VectorValue {
method @NonNull public double[] toArray();
}

public class WriteBatch {
method @NonNull public com.google.android.gms.tasks.Task<java.lang.Void> commit();
method @NonNull public com.google.firebase.firestore.WriteBatch delete(@NonNull com.google.firebase.firestore.DocumentReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

@RunWith(AndroidJUnit4.class)
public class NumericTransformsTest {
private static final double DOUBLE_EPSILON = 0.000001;
public static final double DOUBLE_EPSILON = 0.000001;

// A document reference to read and write to.
private DocumentReference docRef;
Expand Down
Loading
Loading