Skip to content

DOPE-176: add missing Token functions and expressions for token handling - #92

Merged
jansigi merged 5 commits into
mainfrom
feature/DOPE-176-token-functions
Apr 8, 2026
Merged

DOPE-176: add missing Token functions and expressions for token handling#92
jansigi merged 5 commits into
mainfrom
feature/DOPE-176-token-functions

Conversation

@jansigi

@jansigi jansigi commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@jansigi
jansigi requested review from Copilot and pgruntz February 23, 2026 10:32
@jansigi jansigi self-assigned this Feb 23, 2026
@jansigi
jansigi force-pushed the feature/DOPE-176-token-functions branch from 4650502 to 9387339 Compare February 23, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.string to new ch.ergon.dope.resolvable.expression.type.function.token package
  • Added three new token-matching expression types with their corresponding extension functions and options
  • Updated TokensExpression to use TypeExpression<ArrayType<StringType>> instead of raw List<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
jansigi force-pushed the feature/DOPE-176-token-functions branch from 9387339 to 847f270 Compare February 23, 2026 10:43
@jansigi
jansigi requested a review from pgruntz March 26, 2026 08:31
@jansigi
jansigi requested a review from pgruntz April 7, 2026 09:16
@jansigi
jansigi merged commit e020b5f into main Apr 8, 2026
1 check passed
@jansigi
jansigi deleted the feature/DOPE-176-token-functions branch April 8, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants