public class CommonRowParser.DateParser extends CommonRowParser.AbstractFieldParser
Modifier and Type | Field and Description |
---|---|
protected IsoBytesToTimestampConverter |
_isoConverter |
protected java.text.DateFormat |
format |
int[] |
pattern |
protected boolean |
useBuiltin |
scratchDecimal
Constructor and Description |
---|
DateParser(java.lang.String patternStr) |
Modifier and Type | Method and Description |
---|---|
void |
closeAllocation() |
java.util.Properties |
getInitProperties() |
protected int |
getSqlType() |
void |
init(java.util.Properties props) |
protected void |
insertDate(RowInserter stmt,
int col,
long time) |
void |
parse(byte[] buf,
int start,
int end,
RowInserter stmt,
int col)
Parses a value from a range of a byte array, and applies it to the row inserer.
|
void |
parse(java.lang.String data,
RowInserter stmt,
int col)
Parses a value directly from a string and puts it into the row inserter
|
protected long |
parseIsoValue(byte[] buf,
int start,
int length)
Parse a date/time value.
|
protected boolean |
useIsoConverter() |
setContext, setTreatEmptyStringAsNull, treatingEmptyStringsAsNull, verifyNotEmpty
protected java.text.DateFormat format
protected boolean useBuiltin
public int[] pattern
protected IsoBytesToTimestampConverter _isoConverter
protected boolean useIsoConverter()
public void init(java.util.Properties props) throws java.lang.Exception
java.lang.Exception
public java.util.Properties getInitProperties()
protected long parseIsoValue(byte[] buf, int start, int length) throws java.sql.SQLException
java.sql.SQLException
protected void insertDate(RowInserter stmt, int col, long time) throws java.sql.SQLException
java.sql.SQLException
public void parse(byte[] buf, int start, int end, RowInserter stmt, int col) throws java.sql.SQLException
TypeParser
buf
- : parse the value buf[start .. (end-1)]stmt
- gets the valuecol
- column in the statement to storejava.sql.SQLException
public void parse(java.lang.String data, RowInserter stmt, int col) throws java.sql.SQLException
TypeParser
data
- the string representation of the value to parsestmt
- where to store the parsed valuecol
- column in the statement to storejava.sql.SQLException
protected int getSqlType()
public void closeAllocation()
Copyright (C) 2003-2021 SQLstream, Inc.