|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.migrate.postgres.PostgresResultWriterFactory
public class PostgresResultWriterFactory
Result writer factory implementation for formatting result values suitable for importing by a PostgreSQL database.
Field Summary | |
---|---|
private char[][] |
BINARY_ESCAPE
|
private char[][] |
CHAR_ESCAPE
|
private DateFormat |
dateFormat
PostgreSQL uses 'yyyy-MM-dd' for dates. |
private char[] |
NULL_ESCAPE
PostgreSQL uses "\N" for null values. |
private DateFormat |
timestampFormat
PostgreSQL uses 'yyyy-MM-dd HH:mm:ss' for timestamps. |
Constructor Summary | |
---|---|
PostgresResultWriterFactory()
|
Method Summary | |
---|---|
ResultWriter |
create(ResultSet rs,
int index,
Writer writer,
TableInfo.ColumnInfo column)
Create a new result writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final char[] NULL_ESCAPE
private final DateFormat dateFormat
private final DateFormat timestampFormat
private char[][] BINARY_ESCAPE
private char[][] CHAR_ESCAPE
Constructor Detail |
---|
public PostgresResultWriterFactory()
Method Detail |
---|
public ResultWriter create(ResultSet rs, int index, 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
|
3.2.1: 2012-12-13 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |