Skip to content

feat: Add string pipeline expressions#2326

Open
dlarocque wants to merge 8 commits intomainfrom
dl/string-expressions
Open

feat: Add string pipeline expressions#2326
dlarocque wants to merge 8 commits intomainfrom
dl/string-expressions

Conversation

@dlarocque
Copy link
Contributor

Adds string expressions: ltrim, rtrim, stringIndexOf, stringReplaceOne, stringReplaceAll, stringRepeat.

The ltrimValue and rtrimValue functions exist to avoid duplicate function declarations between the functions static Expression rtrim(Expression: valueToTrim) (trim the valueToTrim from this) and Expression ltrim(Expression: exprToTrim) (trim whitespace from exprToTrim). This is already done for the existing trim APIs here and in Android.

Ported from: firebase/firebase-js-sdk#9479

@dlarocque dlarocque requested review from a team as code owners February 26, 2026 21:00
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: firestore Issues related to the googleapis/java-firestore API. labels Feb 26, 2026
@dlarocque dlarocque force-pushed the dl/string-expressions branch from f294d5a to b98718f Compare February 26, 2026 21:26
@dlarocque dlarocque added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 27, 2026
@yoshi-kokoro yoshi-kokoro removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Feb 27, 2026
}

/**
* Creates an expression that removes whitespace from the end of a string or byte array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description is slightly different from the following overload function

}

/**
* Creates an expression that removes trailing whitespace from a string or byte field.
Copy link
Contributor

@milaGGL milaGGL Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use "blob" or "byte", stick to one in the descriptions.

Copy link
Contributor

@milaGGL milaGGL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some minor comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/java-firestore API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants