Git Product home page Git Product logo

Comments (5)

Zerounary avatar Zerounary commented on April 28, 2024 1

在作者说的位置修改,实际代码需要进行流数据的转换,代码如下

    else if(value instanceof CLOB) {
                    StringBuffer sb = new StringBuffer(); 
                    BufferedReader br = new BufferedReader(((CLOB) value).getCharacterStream()); 
                    String s = br.readLine();
                    while (s != null) {
                        sb.append(s); 
                        s = br.readLine(); 
                    }
                    value = sb.toString();
                }

from apijson.

TommyLemon avatar TommyLemon commented on April 28, 2024

看来是 fastjson 不支持 CLOB 类型,可以在 AbstractSQLExecutor.onPutColumn 里面,
仿照327-328行对 Timestamp 的特殊处理

			if (value instanceof Timestamp) {
				value = ((Timestamp) value).toString();
			}

来兼容 CLOB 类型

			if (value instanceof CLOB) {
				value = ((CLOB) value).toString();
			}

from apijson.

TommyLemon avatar TommyLemon commented on April 28, 2024

@Zerounary 非常感谢

from apijson.

TommyLemon avatar TommyLemon commented on April 28, 2024

试了下,CLOB 不是 JDK 里的类,所以不适合放到 APIJSONORM 里(除非依赖 oracle jdbc),
放到 Oracle 对应的 Demo 工程里更好

from apijson.

TommyLemon avatar TommyLemon commented on April 28, 2024

已对 Blob 和 Clob 转换为 String
a0a0fa1

from apijson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.