DOPE-176: add missing Token functions and expressions for token handling - #92
Merged
Conversation
jansigi
force-pushed
the
feature/DOPE-176-token-functions
branch
from
February 23, 2026 10:32
4650502 to
9387339
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds missing token handling functions to the Dope query builder library and reorganizes token-related code into a dedicated package. The changes move the existing TokensExpression from the string package to a new token package and add three new token-matching functions: CONTAINS_TOKEN, CONTAINS_TOKEN_LIKE, and CONTAINS_TOKEN_REGEXP.
Changes:
- Moved token-related code from
ch.ergon.dope.resolvable.expression.type.function.stringto newch.ergon.dope.resolvable.expression.type.function.tokenpackage - Added three new token-matching expression types with their corresponding extension functions and options
- Updated
TokensExpressionto useTypeExpression<ArrayType<StringType>>instead of rawList<String>for better type safety
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/TokensExpression.kt |
Moved and updated TokensExpression to use TypeExpression parameter |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/ContainsTokenExpression.kt |
New CONTAINS_TOKEN function expression |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/ContainsTokenLikeExpression.kt |
New CONTAINS_TOKEN_LIKE function expression |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/ContainsTokenRegexpExpression.kt |
New CONTAINS_TOKEN_REGEXP function expression |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/factory/Tokens.kt |
Moved token options factory (CustomTokenOptions) |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/factory/ContainsToken.kt |
New ContainsTokenOptions for token-matching functions |
couchbase/src/main/kotlin/ch/ergon/dope/couchbase/resolver/expression/FunctionOperatorResolver.kt |
Added resolution logic for new token functions |
couchbase/src/main/kotlin/ch/ergon/dope/couchbase/resolver/expression/TypeExpressionResolver.kt |
Added resolver for ContainsTokenOptions |
couchbase/src/main/kotlin/ch/ergon/dope/couchbase/resolver/CouchbaseResolver.kt |
Registered new option types in resolver |
couchbase/src/test/kotlin/ch/ergon/dope/resolvable/expression/type/function/token/*.kt |
Comprehensive test coverage for all new and moved functionality |
core/src/main/kotlin/ch/ergon/dope/resolvable/expression/type/function/string/TokensExpression.kt |
Deleted (moved to token package) |
couchbase/src/test/kotlin/ch/ergon/dope/resolvable/expression/type/function/string/TokensExpressionTest.kt |
Deleted (moved to token package) |
couchbase/src/test/kotlin/ch/ergon/dope/buildTest/StringFunctionsTest.kt |
Updated imports and minor formatting improvements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jansigi
force-pushed
the
feature/DOPE-176-token-functions
branch
from
February 23, 2026 10:43
9387339 to
847f270
Compare
pgruntz
requested changes
Mar 25, 2026
pgruntz
requested changes
Mar 31, 2026
pgruntz
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.