I'm upgrading my code to Exposed v1, what's the Ro...
# exposed
m
I'm upgrading my code to Exposed v1, what's the RowApi equivalent of ResultSet.getArray?
k
I believe you are looking for
toList
, as in code snippet here
m
I don't see how SizedIterable.toList helps with the RowApi for ColumnType.readObject.
c
Hi @martmists 👋 When working with
RowApi
, you have 2 options: • Use one of the
RowApi.getObject()
methods (overloads here) • Use
RowApi.origin
(api ref) to access the underlying
ResultSet
, so you can keep using your original code, like
RowApi.origin.getArray()
Full example here in migration guide If, for any reason, you choose to use option 1 instead of 2, these are examples of how it's used internally in Exposed common code:
Copy code
// choice will be very dependent on type of custom ColumnType

RowApi.getObject(index, java.sql.Array::class.java)
RowApi.getObject(index, IntArray::class.java)
k
Ah, I misread the API 🙈
kodee loving 1