Skip to content
Advertisement

Kotlin CLOB to String

I have a function in Oracle that returns a CLOB. In Java I can use the following code to execute this function and fetch the result:

Oracle function definition in my Repository class:

JavaScript

Conversion to String:

JavaScript

What’s the equivalent code in Kotlin or any other way to convert the Clob to String?

Advertisement

Answer

It’s absolutely legal use @Query annotation in your kotlin code. For exmaple like this:

JavaScript

And then you can write smomething like this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement