Examples of ResultLob


Examples of org.hsqldb.result.ResultLob

    }

    public long position(SessionInterface session, byte[] pattern,
                         long start) {

        ResultLob resultOut = ResultLob.newLobGetBytePatternPositionRequest(id,
            pattern, start);
        ResultLob resultIn = (ResultLob) session.execute(resultOut);

        if (resultIn.isError()) {
            throw resultIn.getException();
        }

        return resultIn.getOffset();
    }
View Full Code Here

Examples of org.hsqldb_voltpatches.result.ResultLob

                    blob = connection.sessionProxy.createBlob(length);
                    id   = blob.getId();

                    InputStream stream = ((Blob) value).getBinaryStream();
                    ResultLob resultLob = ResultLob.newLobCreateBlobRequest(
                        connection.sessionProxy.getId(), id, stream, length);

                    connection.sessionProxy.allocateResultLob(resultLob, null);
                    resultOut.addLobResult(resultLob);
                } else if (value instanceof InputStream) {
                    long length = streamLengths[i];

                    blob = connection.sessionProxy.createBlob(length);
                    id   = blob.getId();

                    InputStream stream = (InputStream) value;
                    ResultLob resultLob = ResultLob.newLobCreateBlobRequest(
                        connection.sessionProxy.getId(), id, stream, length);

                    connection.sessionProxy.allocateResultLob(resultLob, null);
                    resultOut.addLobResult(resultLob);
                }
                parameterValues[i] = blob;
            } else if (parameterTypes[i].typeCode == Types.SQL_CLOB) {
                long       id;
                ClobDataID clob = null;

                if (value instanceof JDBCClobClient) {

                    // fix id mismatch
                    clob = ((JDBCClobClient) value).clob;
                    id   = clob.getId();
                } else if (value instanceof Clob) {
                    long   length = ((Clob) value).length();
                    Reader reader = ((Clob) value).getCharacterStream();

                    clob = connection.sessionProxy.createClob(length);
                    id   = clob.getId();

                    ResultLob resultLob = ResultLob.newLobCreateClobRequest(
                        connection.sessionProxy.getId(), id, reader, length);

                    connection.sessionProxy.allocateResultLob(resultLob, null);
                    resultOut.addLobResult(resultLob);
                } else if (value instanceof Reader) {
                    long length = streamLengths[i];

                    clob = connection.sessionProxy.createClob(length);
                    id   = clob.getId();

                    Reader reader = (Reader) value;
                    ResultLob resultLob = ResultLob.newLobCreateClobRequest(
                        connection.sessionProxy.getId(), id, reader, length);

                    connection.sessionProxy.allocateResultLob(resultLob, null);
                    resultOut.addLobResult(resultLob);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.