Search in sources :

Example 1 with JDBCClobFile

use of org.hsqldb.jdbc.JDBCClobFile in project rxjava2-jdbc by davidmoten.

the class DatabaseTest method testUpdateClobWithClob.

@Test
public void testUpdateClobWithClob() throws SQLException {
    try (Database db = db()) {
        Clob clob = new JDBCClobFile(new File("src/test/resources/big.txt"));
        insertNullClob(db);
        // 
        db.update(// 
        "update person_clob set document = :doc").parameter("doc", // 
        clob).counts().test().awaitDone(TIMEOUT_SECONDS, // 
        TimeUnit.SECONDS).assertValue(// 
        1).assertComplete();
    }
}
Also used : JDBCClobFile(org.hsqldb.jdbc.JDBCClobFile) Clob(java.sql.Clob) JDBCBlobFile(org.hsqldb.jdbc.JDBCBlobFile) JDBCClobFile(org.hsqldb.jdbc.JDBCClobFile) File(java.io.File) Test(org.junit.Test)

Aggregations

File (java.io.File)1 Clob (java.sql.Clob)1 JDBCBlobFile (org.hsqldb.jdbc.JDBCBlobFile)1 JDBCClobFile (org.hsqldb.jdbc.JDBCClobFile)1 Test (org.junit.Test)1