|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -### [1.35.2](https://www.github.com/googleapis/java-firestore/compare/v1.35.1...v1.35.2) (2020-07-16) |
| 3 | +## [2.0.0](https://www.github.com/googleapis/java-firestore/compare/v1.35.2...v2.0.0) (2020-08-14) |
| 4 | + |
| 5 | + |
| 6 | +### New Features |
| 7 | + |
| 8 | +#### Query Partition API |
| 9 | + |
| 10 | +New API and backend RPC which allows for fetching a set of cursor keys for a |
| 11 | +Collection Group Query. Accessible via the new [`CollectionGroup#getPartitions(long,ApiStreamObserver)`](https://googleapis.dev/java/google-cloud-firestore/2.0.0/com/google/cloud/firestore/CollectionGroup.html#getPartitions-long-com.google.api.gax.rpc.ApiStreamObserver-) method. |
| 12 | + |
| 13 | +#### Read-Only Transaction Options |
| 14 | + |
| 15 | +[`TransactionOptions`](https://googleapis.dev/java/google-cloud-firestore/2.0.0/com/google/cloud/firestore/TransactionOptions.html) |
| 16 | +has been refactored to provide the ability to configure options for read-only |
| 17 | +transactions along with the existing configuration for read-write transactions. |
| 18 | + |
| 19 | +This new ability is provided via the new [`TransactionOptions.createReadOnlyOptionsBuilder()`](https://googleapis.dev/java/google-cloud-firestore/2.0.0/com/google/cloud/firestore/TransactionOptions.html#createReadOnlyOptionsBuilder--) |
| 20 | +type safe builder. |
| 21 | + |
| 22 | +Along with the new type safe builder for read-only options, there is a new type |
| 23 | +safe builder for read-write options as well accessible via [`TransactionOptions.createReadWriteOptionsBuilder()`](https://googleapis.dev/java/google-cloud-firestore/2.0.0/com/google/cloud/firestore/TransactionOptions.html#createReadWriteOptionsBuilder--). Each of the existing `TransactionOptions.create(...)` |
| 24 | +methods for configuring read-write options has been deprecated in favor of the new builder. |
| 25 | + |
| 26 | +#### EmulatorCredentials |
| 27 | + |
| 28 | +`com.google.cloud.firestore.FirestoreOptions.Builder.FakeCredentials` has been |
| 29 | +made static and renamed to `com.google.cloud.firestore.FirestoreOptions.EmulatorCredentials` |
| 30 | +allowing instantiation outside `FirestoreOptions.Builder`. |
| 31 | + |
| 32 | +When connecting to the Cloud Firestore Emulator via `FirestoreOptions` rather than |
| 33 | +the environment variable `FIRESTORE_EMULATOR_HOST`, a custom credential implementation |
| 34 | +must be specified to allow various admin operations in the emulator. Previously |
| 35 | +this required users to create their own implementation due to it not being |
| 36 | +possible to construct a `FakeCredential`. As part of this change, `EmulatorCredentials` |
| 37 | +is static and therefore able to be constructed from any location. |
| 38 | + |
| 39 | +### Breaking Changes |
| 40 | + |
| 41 | +#### New Firestore Admin Client API Artifact |
| 42 | + |
| 43 | +The Cloud Firestore Admin Client has been migrated to its own maven artifact `com.google.cloud:google-cloud-firestore-admin` |
| 44 | +rather than being bundled in `com.google.cloud:google-cloud-firestore`. All |
| 45 | +packages and classes have retained their existing names. |
| 46 | + |
| 47 | +The new artifact is included in the `com.google.cloud:google-cloud-firestore-bom`, |
| 48 | +`com.google.cloud:google-cloud-bom` and `com.google.cloud:libraries-bom` |
| 49 | +artifacts and is accessible by adding the new dependency to your `pom.xml` file: |
| 50 | + |
| 51 | +```xml |
| 52 | +<dependency> |
| 53 | + <groupId>com.google.cloud</groupId> |
| 54 | + <artifactId>google-cloud-firestore-admin</artifactId> |
| 55 | +</dependency> |
| 56 | +``` |
| 57 | + |
| 58 | +#### Removal of v1beta1 |
| 59 | + |
| 60 | +Cloud Firestore has been GA for some time now, and the `google-cloud-firestore` |
| 61 | +code base has been using the protos and generated classes for the v1 api since |
| 62 | +that time. As such, we will no longer be publishing artifacts for the deprecated |
| 63 | +v1beta1 protos. All functionality from v1beta1 is present in v1, and all users |
| 64 | +should update any code to use v1. |
| 65 | + |
| 66 | +#### Removal of support for `java.util.Date` in Snapshots |
| 67 | + |
| 68 | +It is no longer possible to configure the ability for `java.util.Date` to be |
| 69 | +returned from `DocumentSnapshot.get(FieldPath)` or `DocumentSnapshot.getData()` |
| 70 | +for properties which are stored as Timestamps in Cloud Firestore. |
| 71 | + |
| 72 | +The default behavior has been to return `com.google.cloud.Timestamp` by default |
| 73 | +for some time, and is now the only option. Any code that is dependent on the old |
| 74 | +behavior must be updated to use Timestamps instead of Date. |
| 75 | + |
| 76 | +### Laundry List of Pull Requests |
| 77 | + |
| 78 | +#### ⚠ BREAKING CHANGES |
| 79 | + |
| 80 | +* add support for the Query Partition API (#202) |
| 81 | + * `Firestore#collectionGroup(...)` has a new return type `CollectionGroup` |
| 82 | + which requires any code that previously used the method be re-compiled to |
| 83 | + pick up the new signature. `CollectionGroup` extends `Query` and as such |
| 84 | + does not require your code to be updated, only the compiled class files. |
| 85 | +* move FirestoreAdminClient and associated classes to new artifact google-cloud-firestore-admin (#311) |
| 86 | +* remove deprecated v1beta1 protos and grpc client (#305) |
| 87 | +* remove deprecated FirestoreOptions#setTimestampsInSnapshotsEnabled (#308) |
| 88 | +* remove deprecated getCollections() methods (#307) |
| 89 | +* various renames due to generator changes |
| 90 | + |
| 91 | +#### Features |
| 92 | + |
| 93 | +* add support for read-only transactions in TransactionOptions ([#320](https://www.github.com/googleapis/java-firestore/issues/320)) ([c25dca3](https://www.github.com/googleapis/java-firestore/commit/c25dca3ed6ca0c156ec60569ebc9f3a481bd4fee)) |
| 94 | +* add support for the Query Partition API ([#202](https://www.github.com/googleapis/java-firestore/issues/202)) ([3996548](https://www.github.com/googleapis/java-firestore/commit/39965489cbc836af573e500d57007c88241d7eb6)) |
| 95 | + |
| 96 | + |
| 97 | +#### Bug Fixes |
| 98 | + |
| 99 | +* refactor FakeCredentials ([#325](https://www.github.com/googleapis/java-firestore/issues/325)) ([269e62c](https://www.github.com/googleapis/java-firestore/commit/269e62c6b8031d48e7f2e282b09b5ffcfadae547)), closes [#190](https://www.github.com/googleapis/java-firestore/issues/190) |
| 100 | + |
| 101 | + |
| 102 | +#### Dependencies |
| 103 | + |
| 104 | +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.5 ([#322](https://www.github.com/googleapis/java-firestore/issues/322)) ([1b21350](https://www.github.com/googleapis/java-firestore/commit/1b21350c0bc4a21cee2b281f944cbd061b1f8898)) |
| 105 | +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.6 ([#324](https://www.github.com/googleapis/java-firestore/issues/324)) ([b945fdb](https://www.github.com/googleapis/java-firestore/commit/b945fdb04da76a1e007d012c809449c5a43bb990)) |
| 106 | +* update jackson dependencies to v2.11.2 ([#314](https://www.github.com/googleapis/java-firestore/issues/314)) ([15d68cd](https://www.github.com/googleapis/java-firestore/commit/15d68cd93ac1fd206895fd37155a9ba82b9196ca)) |
| 107 | + |
| 108 | + |
| 109 | +#### Miscellaneous Chores |
| 110 | + |
| 111 | +* enable gapicv2 ([#188](https://www.github.com/googleapis/java-firestore/issues/188)) ([92224bc](https://www.github.com/googleapis/java-firestore/commit/92224bcd52aa88cc6eb1da28747de0535d776a0f)) |
| 112 | +* move FirestoreAdminClient and associated classes to new artifact google-cloud-firestore-admin ([#311](https://www.github.com/googleapis/java-firestore/issues/311)) ([03ef755](https://www.github.com/googleapis/java-firestore/commit/03ef755dd164e6f1ec749f3f985b913b5ae23d14)) |
| 113 | +* remove deprecated FirestoreOptions#setTimestampsInSnapshotsEnabled ([#308](https://www.github.com/googleapis/java-firestore/issues/308)) ([7255a42](https://www.github.com/googleapis/java-firestore/commit/7255a42bcee3a6938dd5fafaef3465f948f39600)) |
| 114 | +* remove deprecated getCollections() methods ([#307](https://www.github.com/googleapis/java-firestore/issues/307)) ([bb4ddf1](https://www.github.com/googleapis/java-firestore/commit/bb4ddf1ce3cc3bd2e06a4ad5097bd18060e4467b)) |
| 115 | +* remove deprecated v1beta1 protos and grpc client ([#305](https://www.github.com/googleapis/java-firestore/issues/305)) ([96adacb](https://www.github.com/googleapis/java-firestore/commit/96adacbf52ace27e54b7a210d7c73b46922fbcbd)) |
| 116 | +* add BulkWriter ([#323](https://www.github.com/googleapis/java-firestore/issues/323)) ([e7054df](https://www.github.com/googleapis/java-firestore/commit/e7054df79b4139fdfd0cc6aa0620fbfa1a10a6b0)) |
| 117 | +* make BulkWriter package private ([#330](https://github.com/googleapis/java-firestore/pull/330)) ([ef0869a](https://github.com/googleapis/java-firestore/commit/ef0869a7fa619bc15fef27ad90d41cb718cb981d)) |
| 118 | + |
| 119 | +## [1.35.2](https://www.github.com/googleapis/java-firestore/compare/v1.35.1...v1.35.2) (2020-07-16) |
4 | 120 |
|
5 | 121 |
|
6 | 122 | ### Bug Fixes |
|
0 commit comments