public class PostgresResultWriterFactory extends java.lang.Object implements ResultWriterFactory
Modifier and Type | Field and Description |
---|---|
private char[][] |
BINARY_ESCAPE |
private char[][] |
CHAR_ESCAPE |
private java.text.DateFormat |
dateFormat
PostgreSQL uses 'yyyy-MM-dd' for dates.
|
private char[] |
NULL_ESCAPE
PostgreSQL uses "\N" for null values.
|
private java.text.DateFormat |
timestampFormat
PostgreSQL uses 'yyyy-MM-dd HH:mm:ss' for timestamps.
|
Constructor and Description |
---|
PostgresResultWriterFactory() |
Modifier and Type | Method and Description |
---|---|
ResultWriter |
create(java.sql.ResultSet rs,
int index,
java.io.Writer writer,
TableInfo.ColumnInfo column)
Create a new result writer.
|
private final char[] NULL_ESCAPE
private final java.text.DateFormat dateFormat
private final java.text.DateFormat timestampFormat
private char[][] BINARY_ESCAPE
private char[][] CHAR_ESCAPE
public ResultWriter create(java.sql.ResultSet rs, int index, java.io.Writer writer, TableInfo.ColumnInfo column)
ResultWriterFactory
create
in interface ResultWriterFactory
rs
- The result set that data should be taken fromindex
- The column index that the writer should read date fromwriter
- The writer to write the formatted output tocolumn
- More information about the column that the writer should
read from