public class JsonResultChunk extends SnowflakeResultChunk
SnowflakeResultChunk.DownloadState| Constructor and Description |
|---|
JsonResultChunk(String url,
int rowCount,
int colCount,
int uncompressedSize,
SFBaseSession session) |
| Modifier and Type | Method and Description |
|---|---|
void |
addByte(byte b,
int pos) |
void |
addBytes(byte[] src,
int offset,
int pos,
int length) |
void |
addOffset(int offset) |
void |
addRow(Object[] row) |
int |
computeCharactersNeeded() |
long |
computeNeededChunkMemory()
Compute the memory necessary to store the data of this chunk
|
void |
ensureRowsComplete()
Checks that all data has been added after parsing.
|
static Object |
extractCell(com.fasterxml.jackson.databind.JsonNode resultData,
int rowIdx,
int colIdx) |
void |
freeData()
Free the data stored in this chunk.
|
byte |
get(int offset) |
Object |
getCell(int rowIdx,
int colIdx)
Creates a String object for the given cell
|
void |
nextIndex() |
void |
reset()
Reset all data structure used in this result chunk
|
void |
setIsNull() |
void |
setLastLength(int len) |
void |
tryReuse(net.snowflake.client.jdbc.JsonResultChunk.ResultChunkDataCache cache) |
getColCount, getDownloadCondition, getDownloadError, getDownloadState, getDownloadTime, getLock, getParseTime, getRowCount, getScrubbedUrl, getUncompressedSize, getUrl, isReleased, setDownloadError, setDownloadState, setDownloadTime, setParseTime, setReleasedpublic JsonResultChunk(String url, int rowCount, int colCount, int uncompressedSize, SFBaseSession session)
public static Object extractCell(com.fasterxml.jackson.databind.JsonNode resultData, int rowIdx, int colIdx)
public void tryReuse(net.snowflake.client.jdbc.JsonResultChunk.ResultChunkDataCache cache)
public final Object getCell(int rowIdx, int colIdx)
rowIdx - zero based rowcolIdx - zero based columnpublic final void addRow(Object[] row) throws SnowflakeSQLException
SnowflakeSQLExceptionpublic final void ensureRowsComplete()
throws SnowflakeSQLException
SnowflakeSQLException - when rows are not all downloadedpublic void reset()
SnowflakeResultChunkpublic final long computeNeededChunkMemory()
public final void freeData()
SnowflakeResultChunkpublic int computeCharactersNeeded()
public void addOffset(int offset)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic void setIsNull()
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic void setLastLength(int len)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic void nextIndex()
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic byte get(int offset)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic void addByte(byte b,
int pos)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic void addBytes(byte[] src,
int offset,
int pos,
int length)
throws SnowflakeSQLException
SnowflakeSQLExceptionCopyright © 2022. All rights reserved.