Java SDK Documentation  11.0.1
com.vertica.sdk.Basics Class Reference
Collaboration diagram for com.vertica.sdk.Basics:
Collaboration graph

Static Public Member Functions

static int getNumericPrecision (int typmod)
 Get Numeric precision from typmod.
 
static int getNumericScale (int typmod)
 Get Numeric scale from typmod.
 
static int getNumericWordCount (int precision)
 Get Numeric word count from precision.
 
static boolean isSimilarNumericTypmod (int a, int b)
 Return true if these have the same EE representation.
 
static long JavaSQLDateToVerticaDate (java.sql.Date d)
 
static long JavaSQLTimestampToVerticaTimestamp (java.sql.Timestamp ts)
 
static java.sql.Date VerticaDateToJavaSQLDate (long num_days)
 
static java.sql.Timestamp VerticaTimestampToJavaSQLTimestamp (long vts)
 

Static Public Attributes

static final int DataAreaHeaderLen = 16
 
static final int maxTimestampPricision = 6
 
static final int StringValueHeaderLen = 8
 
static final int StringValueLenOffset = 0
 
static final int StringValueLocOffset = 4
 
static final long TimestampInfiniteNeg = -0x7fffffffffffffffL
 
static final long TimestampInfinitePos = 0x7fffffffffffffffL
 
static final byte vbool_false = 0
 
static final byte vbool_null = 2
 
static final byte vbool_true = 1
 
static final long vfloat_null_long_bits = 0x7ffffffffffffffeL
 
static final long vint_null = 0x8000000000000000L
 

Member Function Documentation

static long com.vertica.sdk.Basics.JavaSQLDateToVerticaDate ( java.sql.Date  d)
static

Get the internal value that Vertica stores for the date type.

Parameters
dA date value. Java stores Date objects as an offset from 1970-01-01 00:00:00 GMT. The day represented by d is the calendar date of d in GMT.
Returns
as a date type internally to vertica

Referenced by com.vertica.sdk.ParamWriter.setDate(), and com.vertica.sdk.BlockWriter.setDate().

static java.sql.Date com.vertica.sdk.Basics.VerticaDateToJavaSQLDate ( long  num_days)
static
Parameters
num_daysnumber of days since 2000-01-01
Returns
the Date
static java.sql.Timestamp com.vertica.sdk.Basics.VerticaTimestampToJavaSQLTimestamp ( long  vts)
static
Parameters
vtsnumber of microseconds since 2000-01-01 00:00:00 GMT
Returns
the Timestamp