Retrieve base64 image stored as a CLOB from derby with Worklight adapter

后端 未结 2 1339
感情败类
感情败类 2020-12-22 05:51

I am trying to retrieve an image stored as a CLOB in a Derby DB via a Worklight SQL adapter. I would like to do something similar to what was written up here: https://www.

2条回答
  •  再見小時候
    2020-12-22 06:08

    org.apache.derby.impl.jdbc.EmbedClob is a java.sql.Clob, so if you have the CLOB in a var, you should be able to get the data with:

    var dataAsString = theClob.getSubString(1, theClob.length());  // Assumes all CLOBS are < 2G
    

提交回复
热议问题