Package org.hsqldb.types

Examples of org.hsqldb.types.ClobDataID


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

                if (value instanceof JDBCClobClient) {

                    // check or 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 = session.createClob(length);
                    id   = clob.getId();

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

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

                    clob = session.createClob(length);
                    id   = clob.getId();

                    Reader reader = (Reader) value;
                    ResultLob resultLob =
                        ResultLob.newLobCreateClobRequest(session.getId(), id,
                            reader, length);
View Full Code Here


        if (data == null) {
            return null;
        }

        ClobData clob = new ClobDataID(lobID);

        return clob;
    }
View Full Code Here

        return blob;
    }

    public ClobDataID createClob(long length) {

        ClobDataID clob = new ClobDataID(getLobId());

        return clob;
    }
View Full Code Here

            return null;
        }

        long id = ((Number) value).longValue();

        return new ClobDataID(id);
    }
View Full Code Here

            return null;
        }

        long id = Long.parseLong(s);

        return new ClobDataID(id);
    }
View Full Code Here

    protected ClobData readClob() throws IOException {

        long id = super.readLong();

        return new ClobDataID(id);
    }
View Full Code Here

            throw Error.error(ErrorCode.X_0F502);
        }

        sessionData.addToCreatedLobs(lobID);

        return new ClobDataID(lobID);
    }
View Full Code Here

        checkColumn(columnIndex);

        Type sourceType = resultMetaData.columnTypes[columnIndex - 1];

        if (sourceType.typeCode == Types.SQL_CLOB) {
            ClobDataID x = (ClobDataID) getColumnInType(columnIndex,
                sourceType);

            if (x == null) {
                return null;
            }

            long length = x.length(session);

            if (length > Integer.MAX_VALUE) {
                JDBCUtil.throwError(Error.error(ErrorCode.X_42561));
            }

            return x.getSubString(session, 0, (int) length);
        }

        return (String) getColumnInType(columnIndex, Type.SQL_VARCHAR);
    }
View Full Code Here

        return blob;
    }

    public ClobDataID createClob(long length) {

        ClobDataID clob = new ClobDataID(getLobId());

        return clob;
    }
View Full Code Here

    protected ClobData readClob() throws IOException {

        long id = super.readLong();

        return new ClobDataID(id);
    }
View Full Code Here

TOP

Related Classes of org.hsqldb.types.ClobDataID

Copyright © 2018 www.massapicom. 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.