Skip to content

Commit

Permalink
deps: update dependency com.google.cloud:native-image-support to v0.1…
Browse files Browse the repository at this point in the history
…2.4 (#882)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:native-image-support](https://togithub.com/googleapis/java-core) | `0.10.0` -> `0.12.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/compatibility-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:native-image-support/0.12.4/confidence-slim/0.10.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-firestore).
  • Loading branch information
renovate-bot committed Feb 18, 2022
1 parent a01fe88 commit b2aeb1a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-firestore/tre

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Native Image Firestore Sample | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/native-image-sample/src/main/java/com/example/firestore/NativeImageFirestoreSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/native-image-sample/src/main/java/com/example/firestore/NativeImageFirestoreSample.java) |
| Person | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/native-image-sample/src/main/java/com/example/firestore/Person.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/native-image-sample/src/main/java/com/example/firestore/Person.java) |
| Quickstart | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/Quickstart.java) |
| Listen Data Snippets | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/snippets/ListenDataSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/snippets/ListenDataSnippets.java) |
| Manage Data Snippets | [source code](https://github.com/googleapis/java-firestore/blob/main/samples/snippets/src/main/java/com/example/firestore/snippets/ManageDataSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-firestore&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/firestore/snippets/ManageDataSnippets.java) |
Expand Down
2 changes: 1 addition & 1 deletion samples/native-image-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>native-image-support</artifactId>
<version>0.10.0</version>
<version>0.12.4</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@
import java.util.List;
import java.util.Map;

/**
* Sample Firestore application demonstrating basic operations.
*/
/** Sample Firestore application demonstrating basic operations. */
public class NativeImageFirestoreSample {

private static final String USERS_COLLECTION = "nativeimage_test_users";

/**
* Entrypoint to the Firestore sample application.
*/
/** Entrypoint to the Firestore sample application. */
public static void main(String[] args) throws Exception {
Instant startTime = Instant.now();
FirestoreOptions firestoreOptions = FirestoreOptions.getDefaultInstance();
Expand Down Expand Up @@ -79,9 +75,7 @@ static void createUserDocument(Firestore db) throws Exception {
static void createUserDocumentPojo(Firestore db) throws Exception {
CollectionReference collectionReference = db.collection(USERS_COLLECTION);
WriteResult result =
collectionReference.document()
.set(new Person("Alan", "Turing", 1912))
.get();
collectionReference.document().set(new Person("Alan", "Turing", 1912)).get();

System.out.println("Created user by POJO. Timestamp: " + result.getUpdateTime());
}
Expand All @@ -99,12 +93,11 @@ static void runSampleQueries(Firestore db) throws Exception {
runQuery(db.collection(USERS_COLLECTION).whereLessThan("born", 1900));
System.out.println("Number of users born before 1900: " + results.size());

results = runQuery(
db.collection(USERS_COLLECTION).whereGreaterThan(FieldPath.of("born"), 1900));
results =
runQuery(db.collection(USERS_COLLECTION).whereGreaterThan(FieldPath.of("born"), 1900));
System.out.println("Number of users born earlier after 1900: " + results.size());

results = runQuery(
db.collection(USERS_COLLECTION).whereEqualTo("name", "Ada"));
results = runQuery(db.collection(USERS_COLLECTION).whereEqualTo("name", "Ada"));
System.out.println("Number of users whose first name is 'Ada': " + results.size());
}

Expand All @@ -124,4 +117,4 @@ private static void printUsers(Iterable<QueryDocumentSnapshot> documents) {
document.getLong("born"));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@

import com.google.cloud.firestore.annotation.DocumentId;

/**
* Simple document object to load into Firestore.
*/
/** Simple document object to load into Firestore. */
public class Person {

@DocumentId
public String id;
@DocumentId public String id;

public String first;

Expand All @@ -37,4 +34,4 @@ public class Person {
this.last = last;
this.born = born;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public void testRunSampleQueries() throws Exception {
assertThat(output).contains("Number of users born earlier after 1900: 0");
assertThat(output).contains("Number of users whose first name is 'Ada': 0");
}
}
}

0 comments on commit b2aeb1a

Please sign in to comment.