File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
main/java/org/ccci/gto/android/common/db
test/kotlin/org/ccci/gto/android/common/db Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,6 @@ sealed class Expression : Parcelable {
8181 infix fun gte (constant : Any ): Expression = gte(constant(constant))
8282 infix fun gte (expression : Expression ): Expression = Binary (Binary .GTE , this , expression)
8383
84- @Deprecated(" Since v4.2.0, use oneOf() instead." , ReplaceWith (" oneOf(*expressions)" ))
85- @Suppress(" ktlint:standard:function-naming" )
86- fun `in` (vararg expressions : Expression ): Expression = oneOf(* expressions)
8784 fun oneOf (vararg expressions : Expression ): Expression = Binary (Binary .IN , this , * expressions)
8885 fun oneOf (literals : List <Expression >): Expression = Binary (Binary .IN , this , * literals.toTypedArray())
8986 fun notIn (vararg expressions : Expression ): Expression = Binary (Binary .NOTIN , this , * expressions)
Original file line number Diff line number Diff line change @@ -68,16 +68,16 @@ class ExpressionTest {
6868 }
6969
7070 @Test
71- fun verifyInSql () {
71+ fun `oneOf()` () {
7272 assertThat(
73- expr.` in ` (Expression .constant(1 ), Expression .constant(2 )).buildSql(dao),
73+ expr.oneOf (Expression .constant(1 ), Expression .constant(2 )).buildSql(dao),
7474 matchesQueryComponent(" (expr IN (1,2))" )
7575 )
7676 }
7777
7878 @Test
7979 fun verifyBinaryArgs () {
80- val expression = field.` in ` (Expression .bind(), Expression .bind()).args(1 , 2 )
80+ val expression = field.oneOf (Expression .bind(), Expression .bind()).args(1 , 2 )
8181 assertThat(expression.buildSql(dao).args, arrayContaining(" 1" , " 2" ))
8282 }
8383
You can’t perform that action at this time.
0 commit comments