nilTheDev
10/28/2021, 3:26 AMint[] of Java in Kotlin? I was using JDBI library and defined an abstract method like that,
@SqlBatch(
"""
// some database query
"""
)
fun updateMany(
// some parameters
): List<Int>
As per the documentation, methods annotated with @SqlBatch should only return one of these, int[] long[] or boolean[] . I thought List<Int> would work here. But it didn't. The exception I got is the following,
interface database.UserDao.updateMany method is annotated with @SqlBatch so should return void, int[], or boolean[] but is returning: interface java.util.List
Tried with Array<Int> as well. But it didn't work either.
So, anybody knows what is the equivalent? Or is it an issue with the library?ephemient
10/28/2021, 3:27 AMIntArray is a primitive int[], Array<Int> is a boxed Integer[]nilTheDev
10/28/2021, 3:29 AM