Java::OracleSql::CLOB to text/string

I am using ojdbc8-19.3.0.0.jar and create connection to an Oracle database.

connection = java.sql.DriverManager.getConnection(“jdbc:oracle:thin:@” + connect_string,
user,password )
statement = connection.create_statement
result_set = statement.execute_query(sql_statement)

One of the columns that the query returns is a CLOB
For Ruby its class is : Java::OracleSql::CLOB

How can convert this to a string ?

Regards Hans

I’ve never used this, but a search for the api throws up: Clob (Java Platform SE 8 )

does something like this work?

str = result_set.getSubString(1, result_set.length)

Will give it a try!
Thanks.

Yes it works.:

r = result_set.next
str = r.getSubString(1, result_set.length)

Super