Examples of ValueLobDb


Examples of org.h2.value.ValueLobDb

                } else {
                    len += getVarIntLen(small.length);
                    len += small.length;
                }
            } else {
                ValueLobDb lob = (ValueLobDb) v;
                byte[] small = lob.getSmall();
                if (small == null) {
                    len += getVarIntLen(-3);
                    len += getVarIntLen(lob.getTableId());
                    len += getVarLongLen(lob.getLobId());
                    len += getVarLongLen(lob.getPrecision());
                } else {
                    len += getVarIntLen(small.length);
                    len += small.length;
                }
            }
View Full Code Here

Examples of org.h2.value.ValueLobDb

                    } else {
                        b = buff;
                    }
                    if (seq == 0 && b.length < BLOCK_LENGTH && b.length <= maxLengthInPlaceLob) {
                        // CLOB: the precision will be fixed later
                        ValueLobDb v = ValueLobDb.createSmallLob(type, b, b.length);
                        return v;
                    }
                    storeBlock(lobId, seq, b, compressAlgorithm);
                }
                return registerLob(type, lobId, TABLE_TEMP, length);
View Full Code Here

Examples of org.h2.value.ValueLobDb

                    "INSERT INTO " + LOBS + "(ID, BYTE_COUNT, TABLE) VALUES(?, ?, ?)");
            prep.setLong(1, lobId);
            prep.setLong(2, byteCount);
            prep.setInt(3, tableId);
            prep.execute();
            ValueLobDb v = ValueLobDb.create(type, this, null, tableId, lobId, byteCount);
            return v;
        } catch (SQLException e) {
            throw DbException.convert(e);
        }
    }
View Full Code Here

Examples of org.h2.value.ValueLobDb

                    "SELECT ?, BYTE_COUNT, ? FROM " + LOBS + " WHERE ID = ?");
            prep.setLong(1, lobId);
            prep.setLong(2, tableId);
            prep.setLong(3, oldLobId);
            prep.executeUpdate();
            ValueLobDb v = ValueLobDb.create(type, this, null, tableId, lobId, length);
            return v;
        } catch (SQLException e) {
            throw DbException.convert(e);
        }
    }
View Full Code Here

Examples of org.h2.value.ValueLobDb

            if (conn == null) {
                return ValueLobDb.createTempClob(reader, maxLength, handler);
            }
            long max = maxLength == -1 ? Long.MAX_VALUE : maxLength;
            CountingReaderInputStream in = new CountingReaderInputStream(reader, max);
            ValueLobDb lob = addLob(in, Long.MAX_VALUE, Value.CLOB);
            lob.setPrecision(in.getLength());
            return lob;
        }
        return ValueLob.createClob(reader, maxLength, handler);
    }
View Full Code Here

Examples of org.lealone.value.ValueLobDb

                    // zero length
                    small = new byte[0];
                }
                if (small != null) {
                    // CLOB: the precision will be fixed later
                    ValueLobDb v = ValueLobDb.createSmallLob(type, small, small.length);
                    return v;
                }
                return registerLob(type, lobId, TABLE_TEMP, length);
            } catch (IOException e) {
                if (lobId != -1) {
View Full Code Here

Examples of org.lealone.value.ValueLobDb

                prep.setLong(1, lobId);
                prep.setLong(2, byteCount);
                prep.setInt(3, tableId);
                prep.execute();
                reuse(sql, prep);
                ValueLobDb v = ValueLobDb.create(type, this, tableId, lobId, null, byteCount);
                return v;
            } catch (SQLException e) {
                throw DbException.convert(e);
            }
        }
View Full Code Here

Examples of org.lealone.value.ValueLobDb

                prep.setLong(2, tableId);
                prep.setLong(3, oldLobId);
                prep.executeUpdate();
                reuse(sql, prep);

                ValueLobDb v = ValueLobDb.create(type, this, tableId, lobId, null, length);
                return v;
            } catch (SQLException e) {
                throw DbException.convert(e);
            }
        }
View Full Code Here

Examples of org.lealone.value.ValueLobDb

                // to read a block while write something)
                return ValueLobDb.createTempClob(reader, maxLength, handler);
            }
            long max = maxLength == -1 ? Long.MAX_VALUE : maxLength;
            CountingReaderInputStream in = new CountingReaderInputStream(reader, max);
            ValueLobDb lob = addLob(in, Long.MAX_VALUE, Value.CLOB);
            lob.setPrecision(in.getLength());
            return lob;
        }
        return ValueLob.createClob(reader, maxLength, handler);
    }
View Full Code Here

Examples of org.lealone.value.ValueLobDb

                } else {
                    writeVarInt(small.length);
                    write(small, 0, small.length);
                }
            } else {
                ValueLobDb lob = (ValueLobDb) v;
                byte[] small = lob.getSmall();
                if (small == null) {
                    writeVarInt(-3);
                    writeVarInt(lob.getTableId());
                    writeVarLong(lob.getLobId());
                    writeVarLong(lob.getPrecision());
                } else {
                    writeVarInt(small.length);
                    write(small, 0, small.length);
                }
            }
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.