public class SnowflakeResultChunk extends Object
Created by jhuang on 11/12/14.
| Modifier and Type | Class and Description |
|---|---|
static class |
SnowflakeResultChunk.DownloadState |
| Constructor and Description |
|---|
SnowflakeResultChunk(String url,
int rowCount,
int colCount,
int uncompressedSize,
boolean useJsonParserV2) |
| 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() |
byte |
get(int offset) |
Object |
getCell(int rowIdx,
int colIdx)
Creates a String object for the given cell
|
int |
getColCount() |
Condition |
getDownloadCondition() |
String |
getDownloadError() |
SnowflakeResultChunk.DownloadState |
getDownloadState() |
long |
getDownloadTime() |
ReentrantLock |
getLock() |
long |
getParseTime() |
int |
getRowCount() |
String |
getScrubbedUrl() |
int |
getUncompressedSize() |
String |
getUrl() |
void |
nextIndex() |
void |
setDownloadError(String downloadError) |
void |
setDownloadState(SnowflakeResultChunk.DownloadState downloadState) |
void |
setDownloadTime(long downloadTime) |
void |
setIsNull() |
void |
setLastLength(int len) |
void |
setParseTime(long parseTime) |
void |
setResultData(com.fasterxml.jackson.databind.JsonNode resultData)
Deprecated.
|
void |
tryReuse(net.snowflake.client.jdbc.SnowflakeResultChunk.ResultChunkDataCache cache) |
public SnowflakeResultChunk(String url, int rowCount, int colCount, int uncompressedSize, boolean useJsonParserV2)
public void tryReuse(net.snowflake.client.jdbc.SnowflakeResultChunk.ResultChunkDataCache cache)
@Deprecated public void setResultData(com.fasterxml.jackson.databind.JsonNode resultData)
resultData - result data in JSON formpublic static Object extractCell(com.fasterxml.jackson.databind.JsonNode resultData, int rowIdx, int colIdx)
public final Object getCell(int rowIdx, int colIdx)
rowIdx - zero based rowcolIdx - zero based columnpublic final String getUrl()
public final String getScrubbedUrl()
public final int getRowCount()
public final int getUncompressedSize()
public final void addRow(Object[] row) throws SnowflakeSQLException
SnowflakeSQLExceptionpublic final void ensureRowsComplete()
throws SnowflakeSQLException
SnowflakeSQLException - when rows are not all downloadedpublic final long computeNeededChunkMemory()
public final void freeData()
public final int getColCount()
public long getDownloadTime()
public void setDownloadTime(long downloadTime)
public long getParseTime()
public void setParseTime(long parseTime)
public ReentrantLock getLock()
public Condition getDownloadCondition()
public String getDownloadError()
public void setDownloadError(String downloadError)
public SnowflakeResultChunk.DownloadState getDownloadState()
public void setDownloadState(SnowflakeResultChunk.DownloadState downloadState)
public 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 © 2019. All rights reserved.