public class SnowflakeUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EXTRA_TYPES_TIMESTAMP_LTZ
Additional data types not covered by standard JDBC
|
static int |
EXTRA_TYPES_TIMESTAMP_TZ |
| Constructor and Description |
|---|
SnowflakeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkErrorAndThrowException(com.fasterxml.jackson.databind.JsonNode rootNode) |
static void |
checkErrorAndThrowExceptionIncludingReauth(com.fasterxml.jackson.databind.JsonNode rootNode) |
static ThreadPoolExecutor |
createDefaultExecutorService(String threadNamePrefix,
int parallel)
Returns a new thread pool configured with the default settings.
|
static SnowflakeColumnMetadata |
extractColumnMetadata(com.fasterxml.jackson.databind.JsonNode colNode,
boolean jdbcTreatDecimalAsInt) |
static Throwable |
getRootCause(Exception ex) |
static boolean |
isBlank(String input) |
static void |
logResponseDetails(org.apache.http.HttpResponse response,
SFLogger logger)
A utility to log response details.
|
static String |
randomAlphaNumeric(int count) |
public static final int EXTRA_TYPES_TIMESTAMP_LTZ
public static final int EXTRA_TYPES_TIMESTAMP_TZ
public static void checkErrorAndThrowExceptionIncludingReauth(com.fasterxml.jackson.databind.JsonNode rootNode)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic static void checkErrorAndThrowException(com.fasterxml.jackson.databind.JsonNode rootNode)
throws SnowflakeSQLException
SnowflakeSQLExceptionpublic static SnowflakeColumnMetadata extractColumnMetadata(com.fasterxml.jackson.databind.JsonNode colNode, boolean jdbcTreatDecimalAsInt) throws SnowflakeSQLException
SnowflakeSQLExceptionpublic static void logResponseDetails(org.apache.http.HttpResponse response,
SFLogger logger)
Used when there is an error in http response
response - http response get from serverlogger - logger objectpublic static ThreadPoolExecutor createDefaultExecutorService(String threadNamePrefix, int parallel)
threadNamePrefix - prefix of the thread nameparallel - the number of concurrencypublic static boolean isBlank(String input)
public static String randomAlphaNumeric(int count)
Copyright © 2019. All rights reserved.