Skip to content

Commit

Permalink
Rename matches extension for Projection.Column and String to match
Browse files Browse the repository at this point in the history
Reduces uncertainty when using the extension function on a `String`, which corresponds to the inbuilt `matches` extension function in kotlin for regex matching
  • Loading branch information
wax911 committed Mar 9, 2021
1 parent 4d08af4 commit df4f3f1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ infix fun Projection.Column.lesserThanOrEqual(value: Any): Criteria {
return Criteria.Operator(this, LESSER_OR_EQUALS, value)
}

infix fun Projection.Column.matches(value: Any): Criteria {
infix fun Projection.Column.match(value: Any): Criteria {
return Criteria.Operator(this, MATCH, value)
}

infix fun String.match(value: Any): Criteria {
return asColumn().match(value)
}


infix fun Projection.Column.startsWith(value: String): Criteria {
Expand Down

0 comments on commit df4f3f1

Please sign in to comment.