diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 96a23eb2b3..8baa50fa2d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,20 +4,20 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The @googleapis/api-firestore @googleapis/firestore-dpe is the default owner for changes in this repo -* @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe +# The @googleapis/firestore-team is the default owner for changes in this repo +* @googleapis/cloud-sdk-java-team @googleapis/firestore-team # for handwritten libraries, keep codeowner_team in .repo-metadata.json as owner -**/*.java @googleapis/api-firestore @googleapis/firestore-dpe +**/*.java @googleapis/firestore-team # For generated Java code -proto-*/ @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe -grpc-*/ @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe +proto-*/ @googleapis/cloud-sdk-java-team @googleapis/firestore-team +grpc-*/ @googleapis/cloud-sdk-java-team @googleapis/firestore-team # Generated code pattern in google-cloud-firestore and google-cloud-firestore-admin -**/*Client.java @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe -**/*Settings.java @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe -**/*ClientHttpJsonTest.java @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe -**/*ClientTest.java @googleapis/cloud-sdk-java-team @googleapis/api-firestore @googleapis/firestore-dpe +**/*Client.java @googleapis/cloud-sdk-java-team @googleapis/firestore-team +**/*Settings.java @googleapis/cloud-sdk-java-team @googleapis/firestore-team +**/*ClientHttpJsonTest.java @googleapis/cloud-sdk-java-team @googleapis/firestore-team +**/*ClientTest.java @googleapis/cloud-sdk-java-team @googleapis/firestore-team # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 81c1a896c2..279f4b52c4 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -63,5 +63,5 @@ permissionRules: permission: admin - team: yoshi-java-admins permission: admin - - team: yoshi-java + - team: cloud-sdk-java-team permission: push diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index 583d05a0f5..cb086cb986 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -37,7 +37,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.66.1 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.67.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} diff --git a/.repo-metadata.json b/.repo-metadata.json index b95420bc8e..49f5536826 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -13,7 +13,7 @@ "api_id": "firestore.googleapis.com", "library_type": "GAPIC_COMBO", "requires_billing": true, - "codeowner_team": "@googleapis/api-firestore @googleapis/firestore-dpe", + "codeowner_team": "@googleapis/firestore-team", "excluded_poms": "google-cloud-firestore,google-cloud-firestore-bom", "issue_tracker": "https://issuetracker.google.com/savedsearches/5337669", "recommended_package": "com.google.cloud.firestore", diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a2164d94..dc50428314 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [3.38.0](https://github.com/googleapis/java-firestore/compare/v3.37.0...v3.38.0) (2026-02-26) + + +### Features + +* Add support for `regexFind` and `regexFindAll` Pipeline expressions ([#2310](https://github.com/googleapis/java-firestore/issues/2310)) ([1d92887](https://github.com/googleapis/java-firestore/commit/1d9288719e36e76d8710233b161ae1c79d50be28)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.67.0 ([aeaf77f](https://github.com/googleapis/java-firestore/commit/aeaf77f9ed7ee6bd145f64977cd516e27f29bbe4)) + + +### Dependencies + +* Update dependency com.google.cloud:sdk-platform-java-config to v3.57.0 ([#2325](https://github.com/googleapis/java-firestore/issues/2325)) ([597ab41](https://github.com/googleapis/java-firestore/commit/597ab41c6387c65d3ef2455303a7f9f66b53fc59)) + ## [3.37.0](https://github.com/googleapis/java-firestore/compare/v3.36.0...v3.37.0) (2026-02-12) diff --git a/README.md b/README.md index 49986a08d2..8d4fad309b 100644 --- a/README.md +++ b/README.md @@ -49,20 +49,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.75.0') +implementation platform('com.google.cloud:libraries-bom:26.76.0') implementation 'com.google.cloud:google-cloud-firestore' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-firestore:3.37.0' +implementation 'com.google.cloud:google-cloud-firestore:3.38.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.37.0" +libraryDependencies += "com.google.cloud" % "google-cloud-firestore" % "3.38.0" ``` ## Authentication @@ -201,7 +201,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-firestore/latest/history [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-firestore.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.37.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-firestore/3.38.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/generation_config.yaml b/generation_config.yaml index 7cdc68d4d9..e72e81c541 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.66.1 -googleapis_commitish: 5b2aa2c08c23f26d6e8abe65377077c624878d12 -libraries_bom_version: 26.75.0 +gapic_generator_version: 2.67.0 +googleapis_commitish: dd3d17addb94bd4a392a5270795c11a27a1334fc +libraries_bom_version: 26.76.0 libraries: - api_shortname: firestore name_pretty: Cloud Firestore @@ -12,7 +12,7 @@ libraries: repo: googleapis/java-firestore repo_short: java-firestore distribution_name: com.google.cloud:google-cloud-firestore - codeowner_team: '@googleapis/api-firestore @googleapis/firestore-dpe' + codeowner_team: '@googleapis/firestore-team' api_id: firestore.googleapis.com library_type: GAPIC_COMBO api_description: is a fully-managed NoSQL document database for mobile, web, and server development from Firebase and Google Cloud Platform. It's backed by a multi-region replicated database that ensures once data is committed, it's durable even in the face of unexpected disasters. Not only that, but despite being a distributed database, it's also strongly consistent and offers seamless integration with other Firebase and Google Cloud Platform products, including Google Cloud Functions. diff --git a/google-cloud-firestore-admin/pom.xml b/google-cloud-firestore-admin/pom.xml index 3a214367ce..356c4b0ab4 100644 --- a/google-cloud-firestore-admin/pom.xml +++ b/google-cloud-firestore-admin/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 google-cloud-firestore-admin - 3.37.0 + 3.38.0 jar Google Cloud Firestore Admin Client https://github.com/googleapis/java-firestore @@ -14,7 +14,7 @@ com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/google-cloud-firestore-bom/pom.xml b/google-cloud-firestore-bom/pom.xml index cea9d50311..79af217cc5 100644 --- a/google-cloud-firestore-bom/pom.xml +++ b/google-cloud-firestore-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-firestore-bom - 3.37.0 + 3.38.0 pom com.google.cloud @@ -52,37 +52,37 @@ com.google.cloud google-cloud-firestore - 3.37.0 + 3.38.0 com.google.cloud google-cloud-firestore-admin - 3.37.0 + 3.38.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.37.0 + 3.38.0 diff --git a/google-cloud-firestore/pom.xml b/google-cloud-firestore/pom.xml index 8a77fc55ef..29a6ff5f35 100644 --- a/google-cloud-firestore/pom.xml +++ b/google-cloud-firestore/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-firestore - 3.37.0 + 3.38.0 jar Google Cloud Firestore https://github.com/googleapis/java-firestore @@ -12,7 +12,7 @@ com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 google-cloud-firestore diff --git a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java index 5443b7513f..363046c39c 100644 --- a/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java +++ b/google-cloud-firestore/src/main/java/com/google/cloud/firestore/pipeline/expressions/Expression.java @@ -1228,6 +1228,134 @@ public static BooleanExpression regexContains(String fieldName, String pattern) return regexContains(field(fieldName), constant(pattern)); } + /** + * Creates an expression that returns the first substring of a string expression that matches a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param string The expression representing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} representing the regular expression find function. + */ + @BetaApi + public static Expression regexFind(Expression string, Expression pattern) { + return new FunctionExpression("regex_find", ImmutableList.of(string, pattern)); + } + + /** + * Creates an expression that returns the first substring of a string expression that matches a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param string The expression representing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} representing the regular expression find function. + */ + @BetaApi + public static Expression regexFind(Expression string, String pattern) { + return regexFind(string, constant(pattern)); + } + + /** + * Creates an expression that returns the first substring of a string field that matches a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param fieldName The name of the field containing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} representing the regular expression find function. + */ + @BetaApi + public static Expression regexFind(String fieldName, Expression pattern) { + return regexFind(field(fieldName), pattern); + } + + /** + * Creates an expression that returns the first substring of a string field that matches a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param fieldName The name of the field containing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} representing the regular expression find function. + */ + @BetaApi + public static Expression regexFind(String fieldName, String pattern) { + return regexFind(field(fieldName), constant(pattern)); + } + + /** + * Creates an expression that evaluates to a list of all substrings in a string expression that + * match a specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param string The expression representing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} that evaluates to a list of matched substrings. + */ + @BetaApi + public static Expression regexFindAll(Expression string, Expression pattern) { + return new FunctionExpression("regex_find_all", ImmutableList.of(string, pattern)); + } + + /** + * Creates an expression that evaluates to a list of all substrings in a string expression that + * match a specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param string The expression representing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} that evaluates to a list of matched substrings. + */ + @BetaApi + public static Expression regexFindAll(Expression string, String pattern) { + return regexFindAll(string, constant(pattern)); + } + + /** + * Creates an expression that evaluates to a list of all substrings in a string field that match a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param fieldName The name of the field containing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} that evaluates to a list of matched substrings. + */ + @BetaApi + public static Expression regexFindAll(String fieldName, Expression pattern) { + return regexFindAll(field(fieldName), pattern); + } + + /** + * Creates an expression that evaluates to a list of all substrings in a string field that match a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param fieldName The name of the field containing the string to search. + * @param pattern The regular expression to search for. + * @return A new {@link Expression} that evaluates to a list of matched substrings. + */ + @BetaApi + public static Expression regexFindAll(String fieldName, String pattern) { + return regexFindAll(field(fieldName), constant(pattern)); + } + /** * Creates an expression that checks if a string field matches a specified regular expression. * @@ -3872,6 +4000,36 @@ public final BooleanExpression regexContains(Object pattern) { return regexContains(this, toExprOrConstant(pattern)); } + /** + * Creates an expression that returns the first substring of a string expression that matches a + * specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param pattern The regular expression to search for. + * @return A new {@link Expression} representing the regular expression find function. + */ + @BetaApi + public final Expression regexFind(Object pattern) { + return regexFind(this, toExprOrConstant(pattern)); + } + + /** + * Creates an expression that evaluates to a list of all substrings in a string expression that + * match a specified regular expression. + * + *

This expression uses the [RE2](https://github.com/google/re2/wiki/Syntax) regular expression + * syntax. + * + * @param pattern The regular expression to search for. + * @return A new {@link Expression} that evaluates to a list of matched substrings. + */ + @BetaApi + public final Expression regexFindAll(Object pattern) { + return regexFindAll(this, toExprOrConstant(pattern)); + } + /** * Creates an expression that checks if this string expression matches a specified regular * expression. diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java index 6fd9075b71..5f810332f1 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java @@ -1046,6 +1046,56 @@ public void testRegexContains() throws Exception { assertThat(data(results)).hasSize(5); } + @Test + public void testRegexFind() throws Exception { + assumeFalse( + "Regexes are not supported against the emulator", + isRunningAgainstFirestoreEmulator(firestore)); + + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("title").regexFind("^\\w+").as("firstWordInTitle")) + .sort(field("firstWordInTitle").ascending()) + .limit(3) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("firstWordInTitle", "1984"), + map("firstWordInTitle", "Crime"), + map("firstWordInTitle", "Dune"))); + } + + @Test + public void testRegexFindAll() throws Exception { + assumeFalse( + "Regexes are not supported against the emulator", + isRunningAgainstFirestoreEmulator(firestore)); + + List results = + firestore + .pipeline() + .createFrom(collection) + .select(field("title").regexFindAll("\\w+").as("wordsInTitle")) + .sort(field("wordsInTitle").ascending()) + .limit(3) + .execute() + .get() + .getResults(); + + assertThat(data(results)) + .isEqualTo( + Lists.newArrayList( + map("wordsInTitle", Lists.newArrayList("1984")), + map("wordsInTitle", Lists.newArrayList("Crime", "and", "Punishment")), + map("wordsInTitle", Lists.newArrayList("Dune")))); + } + @Test public void testRegexMatches() throws Exception { assumeFalse( diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java index 158037e09b..1712046be9 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java @@ -1947,9 +1947,8 @@ public void arrayContainsAnyQueries() throws Exception { if (getFirestoreEdition() == FirestoreEdition.STANDARD) { assertEquals(asList("a", "b", "d", "e"), querySnapshotToIds(query.get().get())); } else { - // TODO: Currently rejected because of mixed type setup, backend will change the behavior; and - // this test will fail by then. - assertThrows(ExecutionException.class, () -> querySnapshotToIds(query.get().get())); + assertThat(querySnapshotToIds(query.get().get())) + .containsExactlyElementsIn(asList("a", "b", "d", "e")); } } diff --git a/grpc-google-cloud-firestore-admin-v1/pom.xml b/grpc-google-cloud-firestore-admin-v1/pom.xml index 8dc03a4ad9..1604037757 100644 --- a/grpc-google-cloud-firestore-admin-v1/pom.xml +++ b/grpc-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 grpc-google-cloud-firestore-admin-v1 GRPC library for grpc-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/grpc-google-cloud-firestore-v1/pom.xml b/grpc-google-cloud-firestore-v1/pom.xml index a385172552..490ddf7a41 100644 --- a/grpc-google-cloud-firestore-v1/pom.xml +++ b/grpc-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 grpc-google-cloud-firestore-v1 GRPC library for grpc-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/pom.xml b/pom.xml index 00633e6976..afffaf0ad3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-firestore-parent pom - 3.37.0 + 3.38.0 Google Cloud Firestore Parent https://github.com/googleapis/java-firestore @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.56.1 + 3.57.0 @@ -150,32 +150,32 @@ com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 com.google.cloud google-cloud-firestore - 3.37.0 + 3.38.0 com.google.cloud proto-google-cloud-firestore-bundle-v1 - 3.37.0 + 3.38.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 com.google.api.grpc grpc-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 com.google.api.grpc grpc-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 diff --git a/proto-google-cloud-firestore-admin-v1/pom.xml b/proto-google-cloud-firestore-admin-v1/pom.xml index 22bf5e9607..a0d2ef07f3 100644 --- a/proto-google-cloud-firestore-admin-v1/pom.xml +++ b/proto-google-cloud-firestore-admin-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-admin-v1 - 3.37.0 + 3.38.0 proto-google-cloud-firestore-admin-v1 PROTO library for proto-google-cloud-firestore-admin-v1 com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/proto-google-cloud-firestore-bundle-v1/pom.xml b/proto-google-cloud-firestore-bundle-v1/pom.xml index 9d9e160564..fd731cd4c9 100644 --- a/proto-google-cloud-firestore-bundle-v1/pom.xml +++ b/proto-google-cloud-firestore-bundle-v1/pom.xml @@ -5,14 +5,14 @@ 4.0.0 proto-google-cloud-firestore-bundle-v1 - 3.37.0 + 3.38.0 proto-google-cloud-firestore-bundle-v1 PROTO library for proto-google-cloud-firestore-bundle-v1 com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/proto-google-cloud-firestore-v1/pom.xml b/proto-google-cloud-firestore-v1/pom.xml index a11b3e6405..dc1eabd055 100644 --- a/proto-google-cloud-firestore-v1/pom.xml +++ b/proto-google-cloud-firestore-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-firestore-v1 - 3.37.0 + 3.38.0 proto-google-cloud-firestore-v1 PROTO library for proto-google-cloud-firestore-v1 com.google.cloud google-cloud-firestore-parent - 3.37.0 + 3.38.0 diff --git a/samples/preview-snippets/src/main/java/com/example/firestore/PipelineSnippets.java b/samples/preview-snippets/src/main/java/com/example/firestore/PipelineSnippets.java index aeb373747c..cf6efe72d1 100644 --- a/samples/preview-snippets/src/main/java/com/example/firestore/PipelineSnippets.java +++ b/samples/preview-snippets/src/main/java/com/example/firestore/PipelineSnippets.java @@ -1257,6 +1257,32 @@ void regexContainsFunction() throws ExecutionException, InterruptedException { System.out.println(result.getResults()); } + void regexFindFunction() throws ExecutionException, InterruptedException { + // [START regex_find] + Pipeline.Snapshot result = + firestore + .pipeline() + .collection("documents") + .select(regexFind(field("email"), "@[A-Za-z0-9.-]+").as("domain")) + .execute() + .get(); + // [END regex_find] + System.out.println(result.getResults()); + } + + void regexFindAllFunction() throws ExecutionException, InterruptedException { + // [START regex_find_all] + Pipeline.Snapshot result = + firestore + .pipeline() + .collection("documents") + .select(regexFindAll(field("comment"), "@[A-Za-z0-9_]+").as("mentions")) + .execute() + .get(); + // [END regex_find_all] + System.out.println(result.getResults()); + } + void regexMatchFunction() throws ExecutionException, InterruptedException { // [START regex_match] Pipeline.Snapshot result = diff --git a/versions.txt b/versions.txt index f58a472c6b..db54585cbc 100644 --- a/versions.txt +++ b/versions.txt @@ -1,11 +1,11 @@ # Format: # module:released-version:current-version -google-cloud-firestore:3.37.0:3.37.0 -google-cloud-firestore-admin:3.37.0:3.37.0 -google-cloud-firestore-bom:3.37.0:3.37.0 -grpc-google-cloud-firestore-admin-v1:3.37.0:3.37.0 -grpc-google-cloud-firestore-v1:3.37.0:3.37.0 -proto-google-cloud-firestore-admin-v1:3.37.0:3.37.0 -proto-google-cloud-firestore-v1:3.37.0:3.37.0 -proto-google-cloud-firestore-bundle-v1:3.37.0:3.37.0 +google-cloud-firestore:3.38.0:3.38.0 +google-cloud-firestore-admin:3.38.0:3.38.0 +google-cloud-firestore-bom:3.38.0:3.38.0 +grpc-google-cloud-firestore-admin-v1:3.38.0:3.38.0 +grpc-google-cloud-firestore-v1:3.38.0:3.38.0 +proto-google-cloud-firestore-admin-v1:3.38.0:3.38.0 +proto-google-cloud-firestore-v1:3.38.0:3.38.0 +proto-google-cloud-firestore-bundle-v1:3.38.0:3.38.0